Archiviert
1
0

fixing /bau bug

Dieser Commit ist enthalten in:
Lixfel 2019-05-28 12:01:43 +02:00
Ursprung 15df6459ae
Commit 28aa1504f0

Datei anzeigen

@ -157,7 +157,7 @@ public class PlayerListener implements Listener {
@EventHandler @EventHandler
public void onChatEvent(ChatEvent e){ public void onChatEvent(ChatEvent e){
if(e.isCommand()){ if(e.getMessage().startsWith("/")){
String [] command = e.getMessage().split(" "); String [] command = e.getMessage().split(" ");
if(command[0].contains(":")){ if(command[0].contains(":")){
e.setCancelled(true); e.setCancelled(true);
@ -167,9 +167,9 @@ public class PlayerListener implements Listener {
} }
}else if(command[0].equalsIgnoreCase("/bau") && e.getSender() instanceof ProxiedPlayer){ }else if(command[0].equalsIgnoreCase("/bau") && e.getSender() instanceof ProxiedPlayer){
ProxiedPlayer sender = (ProxiedPlayer) e.getSender(); ProxiedPlayer sender = (ProxiedPlayer) e.getSender();
if(!sender.getServer().getInfo().getName().equals("Bauserver")){ if(!sender.getServer().getInfo().getName().equals("Bau")){
e.setCancelled(true); e.setCancelled(true);
sender.connect(ProxyServer.getInstance().getServerInfo("Bauserver")); sender.connect(ProxyServer.getInstance().getServerInfo("Bau"));
} }
} }
}else{ }else{