diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java index 43e1a4756..69e6f863d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java @@ -41,13 +41,30 @@ public class UnlockCosmeticsCommand extends CommandBase { addCosmetics(null, caller); } - else if (args.length == 1) + else if (args.length >= 1) { - Player player = Bukkit.getPlayer(args[0]); - if (player != null) + if (args[0].equalsIgnoreCase("all")) { - addCosmetics(null, player); - UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + for (Player player : UtilServer.getPlayers()) + { + if (player != null) + { + addCosmetics(null, player); + UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + } + } + } + else + { + for (int i = 0; i < args.length; ++i) + { + Player player = Bukkit.getPlayer(args[i]); + if (player != null) + { + addCosmetics(null, player); + UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + } + } } } }