Class PlayerDeathListener

java.lang.Object
com.ranull.graves.listener.PlayerDeathListener
All Implemented Interfaces:
org.bukkit.event.Listener

public class PlayerDeathListener extends Object implements 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

    Constructors
    Constructor
    Description
    Constructs a PlayerDeathListener with the specified Graves plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerDeathListener

      public PlayerDeathListener(Graves plugin)
      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.