Fixed players not losing stats when dropping items

This commit is contained in:
Jules 2024-09-09 13:58:13 +02:00
parent 033be01400
commit 83d2c23dad

View File

@ -28,6 +28,7 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
@ -162,7 +163,7 @@ public class PlayerListener implements Listener {
* player cast abilities or attacks with not the correct stats
*
* @deprecated This does cost some performance and that update
* method NEEDS some improvement in the future
* method NEEDS some improvement in the future
*/
@Deprecated
@EventHandler
@ -176,7 +177,7 @@ public class PlayerListener implements Listener {
* player cast abilities or attacks with not the correct stats
*
* @deprecated This does cost some performance and that update
* method NEEDS some improvement in the future
* method NEEDS some improvement in the future
*/
@Deprecated
@EventHandler
@ -184,6 +185,16 @@ public class PlayerListener implements Listener {
PlayerData.get(event.getPlayer()).getInventory().scheduleUpdate();
}
/**
* @deprecated This does cost some performance and that update
* method NEEDS some improvement in the future
*/
@Deprecated
@EventHandler
public void registerInventoryUpdates3(PlayerDropItemEvent event) {
PlayerData.get(event.getPlayer()).getInventory().scheduleUpdate();
}
/**
* Some plugins like to interfere with dropping items when the
* player dies, or whatever of that sort.