Class PlayerQuitListener

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

public class PlayerQuitListener extends Object implements org.bukkit.event.Listener
Listener for handling PlayerQuitEvent to manage player-related data when they leave the game.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Graves
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event)
    Handles the PlayerQuitEvent to clean up player-related data upon their departure.
    private void
    removeLastSolidLocation(org.bukkit.entity.Player player)
    Removes the player's last solid location from the plugin's location manager.

    Methods inherited from class java.lang.Object

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

    • plugin

      private final Graves plugin
  • Constructor Details

    • PlayerQuitListener

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

    • onPlayerQuit

      public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent event)
      Handles the PlayerQuitEvent to clean up player-related data upon their departure. This method removes the player's last solid location and stops any ongoing modification.
      Parameters:
      event - The PlayerQuitEvent to handle.
    • removeLastSolidLocation

      private void removeLastSolidLocation(org.bukkit.entity.Player player)
      Removes the player's last solid location from the plugin's location manager.
      Parameters:
      player - The player whose last solid location should be removed.