diff --git a/src/de/steamwar/bungeecore/commands/TpCommand.java b/src/de/steamwar/bungeecore/commands/TpCommand.java index f13d37b3..bf48b103 100644 --- a/src/de/steamwar/bungeecore/commands/TpCommand.java +++ b/src/de/steamwar/bungeecore/commands/TpCommand.java @@ -53,14 +53,14 @@ public class TpCommand extends BasicCommand { } ServerInfo server = getTarget(args[0]); + ServerInfo teamServer = Storage.teamServers.get(sender.user().getTeam()); - if(server == null) { + if(server == null && !(teamServer != null && player.getServer().getInfo() == teamServer)) { ChatSender.of(player).system("JOINME_PLAYER_OFFLINE"); return; } - ServerInfo teamServer = Storage.teamServers.get(sender.user().getTeam()); //Give control of teleport command to server - if (server == player.getServer().getInfo() || server == teamServer) { + if (server == player.getServer().getInfo() || (teamServer != null && player.getServer().getInfo() == teamServer)) { Chat19.chat(player, "/tp " + String.join(" ", args)); return; }