diff --git a/pom.xml b/pom.xml index 54bb9fb..1a8f5f2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.lukyn76 ImageFireworksPro - 1.1.1 + 1.1.2 jar ImageFireworksPro diff --git a/src/main/java/me/lukyn76/imagefireworkspro/commands/CommandHandler.java b/src/main/java/me/lukyn76/imagefireworkspro/commands/CommandHandler.java index 459913b..4f4cafc 100644 --- a/src/main/java/me/lukyn76/imagefireworkspro/commands/CommandHandler.java +++ b/src/main/java/me/lukyn76/imagefireworkspro/commands/CommandHandler.java @@ -11,6 +11,7 @@ import org.bukkit.command.TabCompleter; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.FireworkMeta; import org.bukkit.inventory.meta.ItemMeta; import java.util.ArrayList; @@ -50,10 +51,11 @@ public boolean onCommand(CommandSender sender, Command command, String s, String amount = Integer.parseInt(args[3]); } ItemStack firework = new ItemStack(Material.FIREWORK_ROCKET, amount); - ItemMeta fireworkMeta = firework.getItemMeta(); + FireworkMeta fireworkMeta = (FireworkMeta) firework.getItemMeta(); fireworkMeta.setDisplayName(imageFirework.getName()); fireworkMeta.setCustomModelData(imageFirework.getCustomModelData()); + fireworkMeta.setPower(1); firework.setItemMeta(fireworkMeta); player.getInventory().addItem(firework);