From a7664f8485ef026e680cc9ae6c4a950a378fee97 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 15 Feb 2023 21:44:29 +0100 Subject: feat: don't bloat chat with toggle events --- src/main/java/ftbsc/bscv/BoSCoVicino.java | 5 ++++- src/main/java/ftbsc/bscv/modules/Module.java | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/ftbsc/bscv/BoSCoVicino.java b/src/main/java/ftbsc/bscv/BoSCoVicino.java index c533bf5..4f4c108 100644 --- a/src/main/java/ftbsc/bscv/BoSCoVicino.java +++ b/src/main/java/ftbsc/bscv/BoSCoVicino.java @@ -75,7 +75,10 @@ public class BoSCoVicino implements ICommons { } public static void log(String message) { - MC.gui.getChat().addMessage(new StringTextComponent(message)); + LOGGER.info(message); + if (MC.player != null) { + MC.player.displayClientMessage(new StringTextComponent(message), true); + } } private void clientSetup(final FMLClientSetupEvent event) { diff --git a/src/main/java/ftbsc/bscv/modules/Module.java b/src/main/java/ftbsc/bscv/modules/Module.java index e0ae606..d2c5598 100644 --- a/src/main/java/ftbsc/bscv/modules/Module.java +++ b/src/main/java/ftbsc/bscv/modules/Module.java @@ -145,7 +145,6 @@ public abstract class Module { // this.enabled.save(); this.onEnabled(); log(String.format("%s enabled", this.name)); - BoSCoVicino.LOGGER.info(String.format("%s enabled", this.name)); } public final void disable() { @@ -154,6 +153,5 @@ public abstract class Module { // this.enabled.save(); this.onDisabled(); log(String.format("%s disabled", this.name)); - BoSCoVicino.LOGGER.info(String.format("%s disabled", this.name)); } } -- cgit v1.2.3-56-ga3b1