SteamWar/BungeeCore
Archiviert
13
2

Fix Internal Error on empty tabcomplete

Dieser Commit ist enthalten in:
Lixfel 2019-04-10 18:22:27 +02:00
Ursprung 12963c601d
Commit b9cd5f72fa
4 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -165,7 +165,7 @@ public class PlayerListener implements Listener {
ProxiedPlayer sender = (ProxiedPlayer) e.getSender(); ProxiedPlayer sender = (ProxiedPlayer) e.getSender();
sender.sendMessage(BungeeCore.ChatPrefix + "§cUnbekannter Befehl."); sender.sendMessage(BungeeCore.ChatPrefix + "§cUnbekannter Befehl.");
} }
}else if(command[0].equals("/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("Bauserver")){
e.setCancelled(true); e.setCancelled(true);

Datei anzeigen

@ -12,6 +12,8 @@ import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.ArrayList;
public class JoinmeCommand extends Command { public class JoinmeCommand extends Command {
public JoinmeCommand() { public JoinmeCommand() {
@ -59,6 +61,6 @@ public class JoinmeCommand extends Command {
if(args.length == 1){ if(args.length == 1){
return allPlayers(args[0]); return allPlayers(args[0]);
} }
return null; return new ArrayList<>();
} }
} }

Datei anzeigen

@ -5,6 +5,8 @@ import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.ArrayList;
public class KickCommand extends Command { public class KickCommand extends Command {
public KickCommand() { public KickCommand() {
@ -42,6 +44,6 @@ public class KickCommand extends Command {
if(args.length == 1){ if(args.length == 1){
return allPlayers(args[0]); return allPlayers(args[0]);
} }
return null; return new ArrayList<>();
} }
} }

Datei anzeigen

@ -5,6 +5,7 @@ import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
public class MsgCommand extends Command { public class MsgCommand extends Command {
@ -57,6 +58,6 @@ public class MsgCommand extends Command {
if(args.length == 1){ if(args.length == 1){
return allPlayers(args[0]); return allPlayers(args[0]);
} }
return null; return new ArrayList<>();
} }
} }