mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-06-28 18:20:31 +00:00
Update several commands with cross-version enum lookups
This commit is contained in:
parent
5a14a64b6c
commit
0114b5e4f6
5 changed files with 28 additions and 13 deletions
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import com.earth2me.essentials.MetaItemStack;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.utils.MaterialUtil;
|
||||
import com.earth2me.essentials.utils.NumberUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.bukkit.DyeColor;
|
||||
|
@ -44,7 +45,7 @@ public class Commandfirework extends EssentialsCommand {
|
|||
@Override
|
||||
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
|
||||
final ItemStack stack = user.getBase().getInventory().getItemInMainHand();
|
||||
if (stack.getType() == Material.FIREWORK_ROCKET || stack.getType() == Material.FIREWORK_STAR) {
|
||||
if (MaterialUtil.isFirework(stack.getType())) {
|
||||
if (args.length > 0) {
|
||||
if (args[0].equalsIgnoreCase("clear")) {
|
||||
FireworkMeta fmeta = (FireworkMeta) stack.getItemMeta();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue