diff options
Diffstat (limited to 'src/main/java')
3 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java index e7d2fdb..130c390 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java @@ -19,6 +19,7 @@ import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import org.apache.commons.lang3.CharUtils; import org.lwjgl.input.Keyboard; @@ -149,7 +150,8 @@ public class ChatListener { } } - @SubscribeEvent + // priority = highest to ignore other mods modifying the chat output + @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true) public void onChatMsgReceive(ClientChatReceivedEvent e) { if (e.type != 2) { String messageSender = null; diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java index 6a0913b..998102d 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java @@ -453,7 +453,8 @@ public class DungeonsListener { }, 40); // 2 second delay, making sure scoreboard got sent } - @SubscribeEvent + // priority = highest to ignore other mods modifying the chat output + @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true) public void onMessageReceived(ClientChatReceivedEvent e) { if (e.type != 2) { // normal chat or system msg (not above action bar) String text = EnumChatFormatting.getTextWithoutFormattingCodes(e.message.getUnformattedText()); diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java index a37d546..ed6906a 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java @@ -11,6 +11,7 @@ import de.cowtipper.cowlection.util.Utils; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.Map; @@ -42,7 +43,8 @@ public class DungeonsPartyListener { } } - @SubscribeEvent + // priority = highest to ignore other mods modifying the chat output + @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true) public void onMessageReceived(ClientChatReceivedEvent e) { if (e.type != 2 && listenForChatMsgs) { // normal chat or system msg (not above action bar), and not stopped if (msgCounter > 15) { |