Added /e clear <player or @a> PC-16
This commit is contained in:
parent
c89669aec9
commit
6c0d18662f
@ -19,6 +19,7 @@ import mineplex.core.common.util.UtilSystem;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.creature.event.CreatureKillEntitiesEvent;
|
||||
import mineplex.core.event.StackerEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphBlock;
|
||||
@ -465,6 +466,34 @@ public class EventModule extends MiniPlugin
|
||||
UtilTextMiddle.display(C.cDGreenB + "Announcement", text);
|
||||
UtilServer.broadcast(F.main("Event Announcement", text));
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("clear"))
|
||||
{
|
||||
String playerName = args[1];
|
||||
|
||||
if (playerName.equalsIgnoreCase("@a"))
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
UtilInv.Clear(player);
|
||||
}
|
||||
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Event", "Cleared everyone's inventory!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Player player = Bukkit.getPlayer(args[1]);
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
UtilPlayer.message(event.getPlayer(), "No matches for: " + F.elem(args[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilInv.Clear(player);
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Event", "Cleared " + F.elem(player.getName() + "'s") + " inventory!"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void listSettings(Player player)
|
||||
|
Loading…
Reference in New Issue
Block a user