From 242e19adb2ab58952aca569534c5399334317733 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 22 Feb 2023 20:07:06 +0100 Subject: [PATCH] Hotfix TeamCommand tp and join --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index 2bf5ddc..ab010db 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -151,7 +151,7 @@ public class TeamCommand extends SWCommand { if(invs.size() == 1){ t = invs.get(0); }else{ - if(args.length != 2){ + if(args.length != 1){ Message.send("TEAM_JOIN_USAGE", player); StringBuilder sb = new StringBuilder(); for(int inv : invs){ @@ -164,7 +164,7 @@ public class TeamCommand extends SWCommand { for(int inv : invs){ Team team = Team.get(inv); - if(team.getTeamName().equals(args[1])){ + if(team.getTeamName().equals(args[0])){ t = inv; break; } @@ -492,13 +492,13 @@ public class TeamCommand extends SWCommand { public void tp(ProxiedPlayer player, String... args){ SteamwarUser user = SteamwarUser.get(player.getUniqueId()); Team team = Team.get(user.getTeam()); - if(args.length == 1){ + if(args.length == 0){ if(notInTeam(player, user)) return; tp(player, team); return; } - Team targetTeam = Team.get(args[1]); + Team targetTeam = Team.get(args[0]); if(targetTeam == null){ Message.send("TEAM_TP_NO_TEAM", player); return;