mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Move firework meta handling into MetaItemStack
Allow firework meta to be applied to item spawning and kit commands.
This commit is contained in:
parent
2b8435342d
commit
73c92bf742
6 changed files with 206 additions and 179 deletions
|
@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
|
|||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.MetaItemStack;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
|
||||
import java.util.Locale;
|
||||
import org.bukkit.Material;
|
||||
|
@ -59,11 +60,9 @@ public class Commanditem extends EssentialsCommand
|
|||
{
|
||||
MetaItemStack metaStack = new MetaItemStack(stack);
|
||||
final boolean allowUnsafe = ess.getSettings().allowUnsafeEnchantments() && user.isAuthorized("essentials.enchant.allowunsafe");
|
||||
|
||||
for (int i = 2; i < args.length; i++)
|
||||
{
|
||||
metaStack.addStringMeta(null, allowUnsafe, args[i], ess);
|
||||
}
|
||||
|
||||
metaStack.parseStringMeta(user, allowUnsafe, args, 2, ess);
|
||||
|
||||
stack = metaStack.getItemStack();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue