aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/util/ChatHelper.java
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2022-10-10 23:33:18 +0200
committerCow <cow@volloeko.de>2022-10-10 23:33:18 +0200
commita71f878644e48189b064a59864ee6c32a64bbed8 (patch)
treeee8a53a14f161ed41775866da81b26cc143bb197 /src/main/java/de/cowtipper/cowlection/util/ChatHelper.java
parent307610afe9a46e1e5ad57b6c1bcbbe2fa5e6747f (diff)
downloadCowlection-a71f878644e48189b064a59864ee6c32a64bbed8.tar.gz
Cowlection-a71f878644e48189b064a59864ee6c32a64bbed8.tar.bz2
Cowlection-a71f878644e48189b064a59864ee6c32a64bbed8.zip
Removed `ClientChatReceivedEvent` when sending mod-internal chat messages
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/util/ChatHelper.java')
-rw-r--r--src/main/java/de/cowtipper/cowlection/util/ChatHelper.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/util/ChatHelper.java b/src/main/java/de/cowtipper/cowlection/util/ChatHelper.java
index eef9ca7..670f1ee 100644
--- a/src/main/java/de/cowtipper/cowlection/util/ChatHelper.java
+++ b/src/main/java/de/cowtipper/cowlection/util/ChatHelper.java
@@ -6,7 +6,6 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
-import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@@ -34,11 +33,7 @@ public class ChatHelper {
if (Minecraft.getMinecraft().thePlayer == null) {
putOfflineMessage(chatComponent);
} else {
- ClientChatReceivedEvent event = new ClientChatReceivedEvent((byte) 1, chatComponent);
- MinecraftForge.EVENT_BUS.post(event);
- if (!event.isCanceled()) {
- Minecraft.getMinecraft().thePlayer.addChatMessage(event.message);
- }
+ Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent);
}
}