diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java index 64816b627e..0b2755a2c4 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java @@ -385,13 +385,13 @@ public class ScoreboardCommand extends VanillaCommand { sender.sendMessage("Added " + addedPlayers.size() + " player(s) to team " + team.getName() + ": " + stringCollectionToString(addedPlayers)); } } else if (args[1].equalsIgnoreCase("leave")) { - if ((sender instanceof Player) ? args.length < 2 : args.length < 3) { + if (!(sender instanceof Player) && args.length < 3) { sender.sendMessage(ChatColor.RED + "/scoreboard teams leave [player...]"); return false; } Set left = new HashSet(); Set noTeam = new HashSet(); - if ((sender instanceof Player) && args.length == 3) { + if ((sender instanceof Player) && args.length == 2) { Team team = mainScoreboard.getPlayerTeam((Player) sender); if (team != null) { team.removePlayer((Player) sender);