Deprecated event
SlimeDog opened this issue · 8 comments
Spigot 1.12 latest (today)
MobHunting 5.0.1
[09:14:49] [Server thread/WARN]: [MobHunting] "MobHunting v5.0.1" has registered a listener for org.bukkit.event.player.PlayerPickupItemEvent on method "public void one.lindegaard.MobHunting.rewards.RewardListeners.onPickupReward(org.bukkit.event.player.PlayerPickupItemEvent)", but the event is Deprecated. "Server performance will be affected"; please notify the authors [Rocologo].
I think the alternative is to use PlayerMoveEvent, but I am afraid about causing lag
I agree I think I close this ticket for now. There is no proper alternative for the moment being.
You should use the newly introduced EntityPickupItemEvent method. It closes the 1.12 duplication bug. Please make the change. In future it will be required.
Ahhh, I have not seen the event before it must have been intruduced with MC 1.12.
Im not aware of any dublication bug in mc 1.12?
I will have to use both EntityPickupItemEvent and PlayerPickupItemEvent in my code. I will have to check the server version and then Listen for the correct Event. I want to make sure that MobHunting is backwards compatible! So it is not that easy as one might think.
I will make the change soon and I think I can use this new event to make sure that mobs dont steal the Bag of gold and wear them on their heads!
Alot of developers has asked for this event for a long time :-)
So It was not that hard :-)
Please help me with the testing. I use EntityPickupItemEvent on MC 1.12 servers now, and I deny Zombies, Skeleton and Wither SKeletons and Pigmen to steal the bag of gold.
Please try build 439 or newer on my jenkins server
http://jenkins.lindegaard.one:8180/job/MobHunting/
And let me know if it works?