mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
Fix /premium. Fixes #1850
Add ArmorStand to list of wipeable entities Add /whohas clear. Resolves #1836
This commit is contained in:
@ -12,7 +12,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
|
||||
@CommandParameters(description = "See who has a block and optionally smite.", usage = "/<command> <item> [smite]", aliases = "wh")
|
||||
@CommandParameters(description = "See who has a block and optionally clears the item.", usage = "/<command> <item> clear", aliases = "wh")
|
||||
public class Command_whohas extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ public class Command_whohas extends FreedomCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
final boolean doSmite = args.length >= 2 && "smite".equalsIgnoreCase(args[1]);
|
||||
final boolean doClear = args.length >= 2 && "clear".equalsIgnoreCase(args[1]);
|
||||
|
||||
final String materialName = args[0];
|
||||
Material material = Material.matchMaterial(materialName);
|
||||
@ -52,9 +52,9 @@ public class Command_whohas extends FreedomCommand
|
||||
if (player.getInventory().contains(material))
|
||||
{
|
||||
players.add(player.getName());
|
||||
if (doSmite && !plugin.al.isAdmin(player))
|
||||
if (doClear && !plugin.al.isAdmin(player))
|
||||
{
|
||||
Command_smite.smite(player);
|
||||
player.getInventory().remove(material);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user