[SPIGOT-266] ProjectileLaunchEvent setShooter(null) not work on Snowball Created: 23/Dec/14  Updated: 30/Dec/14  Resolved: 30/Dec/14

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jannik8500 Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: 1.8, bug, spigot


 Description   

If i check in this ProjectileLaunchEvent if the entity is a Snowball and than i do e.getEntity().setShooter(null); does does the shooter not removing.



 Comments   
Comment by Jannik8500 [ 25/Dec/14 ]

Thank you! It works perfect!

//can be closed

Comment by FearThe1337 [ 25/Dec/14 ]

There are 2 functions, one (deprecated) will indeed not remove the shooter, the one accepting ProjectileSource will reset it based on the code.
Hence be sure to call the function accepting the ProjectileSource object. (cast the null if needed)

Comment by Jannik8500 [ 25/Dec/14 ]

Nope, i want to remove the Shooter in the ProjectileLaunchEvent, short: i want remove the shooter.

Comment by FearThe1337 [ 25/Dec/14 ]

Make sure you are using the setShooter(ProjectileSource) and not the other setShooter. (Compile against the latest API to be sure).

Comment by Jannik8500 [ 24/Dec/14 ]

Not work with the newest version...

Comment by SpigotMC [ 23/Dec/14 ]

Your build is not the latest and therefor may be the reason you are having this issue. Spigot is 15 version(s) behind. CraftBukkit is 37 version(s) behind. This message was automatically generated and is not guaranteed to be a solution to your issue.

Generated at Mon Apr 21 21:19:19 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.