Add cosmetics unlock command for all players
This commit is contained in:
parent
60f4511a79
commit
7f729ca586
@ -41,13 +41,30 @@ public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>
|
|||||||
{
|
{
|
||||||
addCosmetics(null, caller);
|
addCosmetics(null, caller);
|
||||||
}
|
}
|
||||||
else if (args.length == 1)
|
else if (args.length >= 1)
|
||||||
{
|
{
|
||||||
Player player = Bukkit.getPlayer(args[0]);
|
if (args[0].equalsIgnoreCase("all"))
|
||||||
if (player != null)
|
|
||||||
{
|
{
|
||||||
addCosmetics(null, player);
|
for (Player player : UtilServer.getPlayers())
|
||||||
UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!"));
|
{
|
||||||
|
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()) + "!"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user