SteamWar/BungeeCore
Archiviert
13
2

Hotfix TpCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-06-26 16:17:44 +02:00
Ursprung a6642d3d14
Commit 61fff5ba08

Datei anzeigen

@ -52,10 +52,14 @@ public class TpCommand extends BasicCommand {
return; return;
} }
ServerInfo server = getTarget(player, args[0]); ServerInfo server = getTarget(args[0]);
//Give control of teleport command to server
if(server == null) { if(server == null) {
ChatSender.of(player).system("JOIN_PLAYER_BLOCK");
return;
}
//Give control of teleport command to server
if (server == player.getReconnectServer()) {
Chat19.chat(player, "/tp " + String.join(" ", args)); Chat19.chat(player, "/tp " + String.join(" ", args));
return; return;
} }
@ -110,7 +114,7 @@ public class TpCommand extends BasicCommand {
} }
} }
private static ServerInfo getTarget(ProxiedPlayer player, String arg) { private static ServerInfo getTarget(String arg) {
ServerInfo server = null; ServerInfo server = null;
//Get target player server //Get target player server
@ -128,9 +132,6 @@ public class TpCommand extends BasicCommand {
} }
} }
if(server == player.getServer().getInfo())
server = null;
return server; return server;
} }
} }