Package com.ranull.graves.listener
Class PlayerDeathListener
java.lang.Object
com.ranull.graves.listener.PlayerDeathListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener for handling PlayerDeathEvent to manage items dropped upon player death.
Specifically, it handles compass items based on their association with graves.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerDeathListener
(Graves plugin) Constructs a PlayerDeathListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onPlayerDeath
(org.bukkit.event.entity.PlayerDeathEvent event) Handles the PlayerDeathEvent to remove compass items from the drop list if they are associated with graves.
-
Constructor Details
-
PlayerDeathListener
Constructs a PlayerDeathListener with the specified Graves plugin.- Parameters:
plugin
- The Graves plugin instance.
-
-
Method Details
-
onPlayerDeath
public void onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent event) Handles the PlayerDeathEvent to remove compass items from the drop list if they are associated with graves. If a compass item is linked to a grave and the configuration setting "compass.destroy" is true, the item is removed from the drop list. The remaining items are then cached for later reference.- Parameters:
event
- The PlayerDeathEvent to handle.
-