Class PlayerTeleportListener

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

public class PlayerTeleportListener extends Object implements org.bukkit.event.Listener
Listens for PlayerTeleportEvent to handle interactions with grave blocks and remove specific items from the player's inventory if they teleport into a grave location.
  • Constructor Details

    • PlayerTeleportListener

      public PlayerTeleportListener(Graves plugin)
      Constructs a new PlayerTeleportListener with the specified Graves plugin.
      Parameters:
      plugin - The Graves plugin instance.
  • Method Details

    • onPlayerTeleport

      public void onPlayerTeleport(org.bukkit.event.player.PlayerTeleportEvent event)
      Handles PlayerTeleportEvent to manage interactions with grave blocks when a player teleports. Checks if the player's new location is within a 15-block radius of any grave and removes specific compass items from their inventory if so.
      Parameters:
      event - The PlayerTeleportEvent to handle.