Skip to main content
Discovery icon for PaperMC Discord server

PaperMC

17,502 Online
55,179 Members
# paper-dev3 people

modifying projectiles in bow events

Accessing and modifying projectiles in EntityShootBowEvent requires casting from Entity to Projectile safely and handling arrow entity types.

  • EntityShootBowEvent returns an Entity rather than a Projectile for getProjectile, requiring casting to access methods like setShooter
  • Blindly casting getProjectile to Projectile can cause ClassCastExceptions if modified by other plugins, so pattern matching with instanceof is recommended
  • The TippedArrow class is deprecated because tipped arrows and standard arrows share the same underlying entity type
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App