-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
This server is running CraftBukkit version 3976-Spigot-06d602e-b3b43a6 (MC: 1.20.4)
-
Yes
Hello,
If you launch an arrow with the method launchProjectile(), the entity return by this method is not instance of Arrow.
Example with a simple event
@EventHandler() public void onPlayerToggleSneakEvent(PlayerToggleSneakEvent e) { Bukkit.broadcastMessage("PlayerToggleSneakEvent"); if (e.isSneaking()) { Entity entity = e.getPlayer().launchProjectile(Arrow.class); Bukkit.broadcastMessage("Projectile instance of Arrow ? "+(entity instanceof Arrow)); } else Bukkit.broadcastMessage("Not Sneaking"); }
Output of this event :