From 92cc4cf89724e8a6e5f6d0f79a7d9c807206fed1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 27 Jun 2022 15:41:05 +0200 Subject: [PATCH] Fix TpCommand for teamserver --- src/de/steamwar/bungeecore/commands/TpCommand.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TpCommand.java b/src/de/steamwar/bungeecore/commands/TpCommand.java index a5fc477..04cbb02 100644 --- a/src/de/steamwar/bungeecore/commands/TpCommand.java +++ b/src/de/steamwar/bungeecore/commands/TpCommand.java @@ -53,11 +53,10 @@ public class TpCommand extends BasicCommand { } ServerInfo server = getTarget(args[0]); - ServerInfo teamServer = Storage.teamServers.get(sender.user().getTeam()); - System.out.println(teamServer + " " + sender.user().getTeam()); + boolean onTeamServer = Storage.teamServers.containsValue(player.getServer().getInfo()); //Give control of teleport command to server - if (server == player.getServer().getInfo() || teamServer == player.getServer().getInfo()) { + if (server == player.getServer().getInfo() || onTeamServer) { Chat19.chat(player, "/tp " + String.join(" ", args)); return; }