diff options
author | KHobbits <rob@khobbits.co.uk> | 2014-02-02 18:56:45 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-02-02 18:56:45 +0000 |
commit | 63300866f988292d0d2e84fe629c99d4de9cb2f7 (patch) | |
tree | 4df16f9c8e975921fd8a921bc5aca432ba024e40 | |
parent | c8212371ffb025d164f223aee2fe1cda8dce724a (diff) | |
download | Essentials-63300866f988292d0d2e84fe629c99d4de9cb2f7.tar Essentials-63300866f988292d0d2e84fe629c99d4de9cb2f7.tar.gz Essentials-63300866f988292d0d2e84fe629c99d4de9cb2f7.tar.lz Essentials-63300866f988292d0d2e84fe629c99d4de9cb2f7.tar.xz Essentials-63300866f988292d0d2e84fe629c99d4de9cb2f7.zip |
Fixed argument count for meta parsing.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandgive.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index 54c5a0afb..8c1d57a48 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -78,7 +78,12 @@ public class Commandgive extends EssentialsCommand allowUnsafe = false; } - metaStack.parseStringMeta(sender, allowUnsafe, args, NumberUtil.isInt(args[3]) ? 4 : 3, ess); + int metaStart = NumberUtil.isInt(args[3]) ? 4 : 3; + + if (args.length > metaStart) + { + metaStack.parseStringMeta(sender, allowUnsafe, args, metaStart, ess); + } stack = metaStack.getItemStack(); } |