From 80ffe4a632c9d1cc2c7021b990939916fd0155e0 Mon Sep 17 00:00:00 2001 From: HacktheTime Date: Mon, 23 Oct 2023 21:57:14 +0200 Subject: added Numpad codes. limitations: currently missing scroll pane so youre limited because you cant edit the lower ones commands are sent to the server so client side commands do not work unfortunately. --- .../main/java/de/hype/bbsentials/forge/ForgeChat.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'forge/src/main/java/de') diff --git a/forge/src/main/java/de/hype/bbsentials/forge/ForgeChat.java b/forge/src/main/java/de/hype/bbsentials/forge/ForgeChat.java index 7764d7b..ef5d7ed 100644 --- a/forge/src/main/java/de/hype/bbsentials/forge/ForgeChat.java +++ b/forge/src/main/java/de/hype/bbsentials/forge/ForgeChat.java @@ -2,11 +2,9 @@ package de.hype.bbsentials.forge; import de.hype.bbsentials.common.chat.Chat; import de.hype.bbsentials.common.chat.Message; -import de.hype.bbsentials.common.client.BBsentials; import de.hype.bbsentials.common.mclibraries.MCChat; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.util.ChatStyle; import net.minecraft.util.IChatComponent; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.common.MinecraftForge; @@ -29,7 +27,7 @@ public class ForgeChat implements MCChat { //2 means action bar // Chat.sendPrivateMessageToSelfDebug(String.valueOf(((int) event.type))); Message message = new Message(IChatComponent.Serializer.componentToJson(event.message), event.message.getUnformattedText()); - Message newMessage = chat.onEvent(message); + Message newMessage = chat.onEvent(message, false); if (!newMessage.equals(message)) { event.setCanceled(true); sendClientSideMessage(newMessage); @@ -46,19 +44,6 @@ public class ForgeChat implements MCChat { } } - - public void sendClientSideMessage(Message message, boolean actionbar) { - if (BBsentials.config.swapActionBarChat && !BBsentials.config.swapOnlyNormal) { - actionbar = !actionbar; - } - if (actionbar) { - showActionBar(message); - } - else { - sendClientSideMessage(message); - } - } - public void sendChatMessage(String message) { Minecraft.getMinecraft().thePlayer.sendChatMessage(message); } -- cgit