From 28aa1504f034f93053bf5d99898fae67cae456e8 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 28 May 2019 12:01:43 +0200 Subject: [PATCH] fixing /bau bug --- src/de/warking/bungeecore/PlayerListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/warking/bungeecore/PlayerListener.java b/src/de/warking/bungeecore/PlayerListener.java index f5b1f9a..862e303 100644 --- a/src/de/warking/bungeecore/PlayerListener.java +++ b/src/de/warking/bungeecore/PlayerListener.java @@ -157,7 +157,7 @@ public class PlayerListener implements Listener { @EventHandler public void onChatEvent(ChatEvent e){ - if(e.isCommand()){ + if(e.getMessage().startsWith("/")){ String [] command = e.getMessage().split(" "); if(command[0].contains(":")){ e.setCancelled(true); @@ -167,9 +167,9 @@ public class PlayerListener implements Listener { } }else if(command[0].equalsIgnoreCase("/bau") && e.getSender() instanceof ProxiedPlayer){ ProxiedPlayer sender = (ProxiedPlayer) e.getSender(); - if(!sender.getServer().getInfo().getName().equals("Bauserver")){ + if(!sender.getServer().getInfo().getName().equals("Bau")){ e.setCancelled(true); - sender.connect(ProxyServer.getInstance().getServerInfo("Bauserver")); + sender.connect(ProxyServer.getInstance().getServerInfo("Bau")); } } }else{