Archiviert
1
0

Update local chat

Dieser Commit ist enthalten in:
yoyosource 2022-04-13 22:00:31 +02:00
Ursprung acb7aa1efb
Commit 8191c134c7

Datei anzeigen

@ -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){