summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-01-27 17:22:04 +0000
committerKHobbits <rob@khobbits.co.uk>2013-01-27 17:22:43 +0000
commit76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7 (patch)
treee8bcc18ab25e67de099fc04e9c9861f0114305fc
parent9fb42375b82051497fe63c98f0a404eca2d5144d (diff)
downloadEssentials-76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7.tar
Essentials-76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7.tar.gz
Essentials-76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7.tar.lz
Essentials-76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7.tar.xz
Essentials-76d1ea5cab0f0d994c344ec60dcd0b1b2a3631a7.zip
Minor /ci tweak.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
index ba3a3a8a6..51b7455bf 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java
@@ -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]))