Package com.ranull.graves.listener
Class PlayerQuitListener
java.lang.Object
com.ranull.graves.listener.PlayerQuitListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Listener for handling PlayerQuitEvent to manage player-related data when they leave the game.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlayerQuitListener
(Graves plugin) Constructs a PlayerQuitListener with the specified Graves plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Field Details
-
plugin
-
-
Constructor Details
-
PlayerQuitListener
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.
-