mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Minor /ci tweak.
This commit is contained in:
parent
9fb42375b8
commit
76d1ea5cab
@ -122,7 +122,7 @@ public class Commandclearinventory extends EssentialsCommand
|
||||
|
||||
private void clearInventory(Player player, String arg) throws Exception
|
||||
{
|
||||
if (arg.contentEquals("*"))
|
||||
if (arg.equalsIgnoreCase("*"))
|
||||
{
|
||||
player.getInventory().clear();
|
||||
}
|
||||
@ -132,10 +132,14 @@ public class Commandclearinventory extends EssentialsCommand
|
||||
final ItemStack item = ess.getItemDb().get(split[0]);
|
||||
final int type = item.getTypeId();
|
||||
|
||||
if (split.length > 1 && Util.isInt(arg.replace(":", "")))
|
||||
if (split.length > 1 && Util.isInt(split[1]))
|
||||
{
|
||||
player.getInventory().clear(type, Integer.parseInt(split[1]));
|
||||
}
|
||||
else if (split.length > 1 && split[1].equalsIgnoreCase("*"))
|
||||
{
|
||||
player.getInventory().clear(type, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Util.isInt(split[0]))
|
||||
|
Loading…
Reference in New Issue
Block a user