Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
also clean bossbar components
Browse files Browse the repository at this point in the history
  • Loading branch information
btwonion committed Jul 30, 2024
1 parent 07db62a commit 46fda07
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

//? if <1.21
/*import dev.nyon.skylper.skyblock.data.session.PlayerSessionData;*/

@Mixin(BossEvent.class)
public class BossEventMixin {

Expand All @@ -20,6 +23,8 @@ private void invokeEvent(
Component name,
CallbackInfo ci
) {
EventHandler.INSTANCE.invokeEvent(new BossBarNameUpdate(name, name.getString()));
String rawMessage = /*? if <1.21 {*//*name.getString().replace(PlayerSessionData.INSTANCE.getComponentFixRegex().toString(), ""); *//*?} else {*/ name.getString(); /*?}*/

EventHandler.INSTANCE.invokeEvent(new BossBarNameUpdate(name, rawMessage));
}
}

0 comments on commit 46fda07

Please sign in to comment.