-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor
-
None
-
Affects Version/s: None
-
None
-
4195-a-Spigot-f6a4805-cebb58e(MC: 1.20.6),4290-Spigot-5a6439b-b95736b (MC: 1.21.1)
-
Yes
〇How to check the phenomenon〇
1. Generate a PlayerInteractEvent while holding power1 fireworks in your hand.
2.Cast event.getItem().getItemMeta() to FireworkMeta
3. Execute getPower() on the cast fireworkMeta
@EventHandler public void onPlayerInteract(PlayerInteractEvent event) { ItemStack itemMainHand = event.getItem(); FireworkMeta fireworkMeta = (FireworkMeta) itemMainHand.getItemMeta(); plugin.getLogger().info("power:" + fireworkMeta.getPower()); }
The attached plug-in is a plug-in that outputs the value of fireworks when the player left-clicks with fireworks.
〇Phenomenon that is occurring〇
getPower() returns 0
〇Expected phenomenon〇
getPower() returns 1
〇Remarks〇
This text was created using translation software.
Please ask if you have any questions.