Class PainterListener
java.lang.Object
dev.despical.pixelpainter.listener.PainterListener
- All Implemented Interfaces:
org.bukkit.event.Listener
Releases painting resources when a player disconnects and protects the active world.
A departing player's world job and cancellable image preparations are stopped while durable undo data is retained. An explicit world unload is cancelled while the active painting job still holds chunk tickets in that world.
Handlers run on the server thread and only delegate to the painting service and command dispatcher.
-
Constructor Summary
ConstructorsConstructorDescriptionPainterListener(PixelPainter plugin) Creates a listener bound to an enabled plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidonQuit(org.bukkit.event.player.PlayerQuitEvent event) Stops the departing owner's world job and cancellable image preparations.voidonWorldUnload(org.bukkit.event.world.WorldUnloadEvent event) Prevents an explicit unload from invalidating the active painting world.
-
Constructor Details
-
PainterListener
Creates a listener bound to an enabled plugin.- Parameters:
plugin- owning plugin that provides the painting services
-
-
Method Details
-
onQuit
public void onQuit(org.bukkit.event.player.PlayerQuitEvent event) Stops the departing owner's world job and cancellable image preparations.- Parameters:
event- player disconnect notification
-
onWorldUnload
public void onWorldUnload(org.bukkit.event.world.WorldUnloadEvent event) Prevents an explicit unload from invalidating the active painting world.- Parameters:
event- proposed world unload
-