mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-02 06:27:42 +01:00
Fixed players not losing stats when dropping items
This commit is contained in:
parent
033be01400
commit
83d2c23dad
@ -28,6 +28,7 @@ import org.bukkit.event.EventPriority;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||||
|
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
||||||
@ -184,6 +185,16 @@ public class PlayerListener implements Listener {
|
|||||||
PlayerData.get(event.getPlayer()).getInventory().scheduleUpdate();
|
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
|
* Some plugins like to interfere with dropping items when the
|
||||||
* player dies, or whatever of that sort.
|
* player dies, or whatever of that sort.
|
||||||
|
Loading…
Reference in New Issue
Block a user