From 8191c134c7141f415ff66934c643b87847ae488f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 13 Apr 2022 22:00:31 +0200 Subject: [PATCH] Update local chat --- .../bungeecore/listeners/ChatListener.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/ChatListener.java b/src/de/steamwar/bungeecore/listeners/ChatListener.java index f2ff5a1b..4baa0af0 100644 --- a/src/de/steamwar/bungeecore/listeners/ChatListener.java +++ b/src/de/steamwar/bungeecore/listeners/ChatListener.java @@ -19,7 +19,10 @@ package de.steamwar.bungeecore.listeners; -import de.steamwar.bungeecore.*; +import de.steamwar.bungeecore.BungeeCore; +import de.steamwar.bungeecore.Message; +import de.steamwar.bungeecore.Servertype; +import de.steamwar.bungeecore.Subserver; import de.steamwar.bungeecore.bot.SteamwarDiscordBot; import de.steamwar.bungeecore.commands.TpCommand; import de.steamwar.bungeecore.comms.packets.PingPacket; @@ -33,8 +36,6 @@ import net.md_5.bungee.api.event.TabCompleteResponseEvent; import net.md_5.bungee.api.scheduler.TaskScheduler; import net.md_5.bungee.event.EventHandler; -import java.sql.Timestamp; -import java.time.Instant; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.logging.Level; @@ -124,15 +125,14 @@ public class ChatListener extends BasicListener { private void onPlusMessage(ChatEvent e) { ProxiedPlayer p = (ProxiedPlayer) e.getSender(); Subserver subserver = Subserver.getSubserver(p); - if(subserver instanceof Bauserver) { - String[] smolArgs = e.getMessage().substring(1).split(" "); - String[] args = new String[smolArgs.length + 1]; - args[0] = ""; - System.arraycopy(smolArgs, 0, args, 1, smolArgs.length); - localChat(e, args); - } else { - onChat(e); + if(subserver != null && subserver.getType() == Servertype.ARENA && subserver.getServer() == ((ProxiedPlayer) e.getSender()).getServer().getInfo()) { + return; } + String[] smolArgs = e.getMessage().substring(1).split(" "); + String[] args = new String[smolArgs.length + 1]; + args[0] = ""; + System.arraycopy(smolArgs, 0, args, 1, smolArgs.length); + localChat(e, args); } private void onChat(ChatEvent e){