From 63300866f988292d0d2e84fe629c99d4de9cb2f7 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 2 Feb 2014 18:56:45 +0000 Subject: [PATCH] Fixed argument count for meta parsing. --- .../src/com/earth2me/essentials/commands/Commandgive.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); }