Don't check people for meta perms when using kits.

This commit is contained in:
KHobbits 2013-03-07 02:57:25 +00:00
parent 32d44eb13d
commit 7d0fafd084
3 changed files with 11 additions and 7 deletions

View File

@ -120,7 +120,7 @@ public class Kit
if (parts.length > 2)
{
metaStack.parseStringMeta(user, allowUnsafe, parts, 2, ess);
metaStack.parseStringMeta(null, allowUnsafe, parts, 2, ess);
}
final Map<Integer, ItemStack> overfilled;

View File

@ -169,7 +169,7 @@ public class MetaItemStack
}
else
{
sender.sendMessage(_("noChapterMeta"));
throw new Exception(_("noChapterMeta"));
}
}
@ -270,7 +270,6 @@ public class MetaItemStack
}
else
{
sender.sendMessage(_("fireworkSyntax"));
throw new Exception(_("invalidFireworkFormat", split[1], split[0]));
}
}
@ -286,7 +285,6 @@ public class MetaItemStack
}
else
{
sender.sendMessage(_("fireworkSyntax"));
throw new Exception(_("invalidFireworkFormat", split[1], split[0]));
}
if (finalEffect != null)
@ -306,7 +304,6 @@ public class MetaItemStack
}
else
{
sender.sendMessage(_("fireworkSyntax"));
throw new Exception(_("invalidFireworkFormat", split[1], split[0]));
}
}
@ -330,7 +327,6 @@ public class MetaItemStack
}
else
{
sender.sendMessage(_("fireworkSyntax"));
throw new Exception(_("invalidFireworkFormat", split[1], split[0]));
}
}

View File

@ -111,7 +111,15 @@ public class Commandfirework extends EssentialsCommand
final MetaItemStack mStack = new MetaItemStack(stack);
for (String arg : args)
{
mStack.addFireworkMeta(user, true, arg, ess);
try
{
mStack.addFireworkMeta(user, true, arg, ess);
}
catch (Exception e)
{
user.sendMessage(_("fireworkSyntax"));
throw e;
}
}
if (mStack.isValidFirework())