Class LavaPlayerStopPlayingEvent
java.lang.Object
org.bukkit.event.Event
space.subkek.customdiscs.api.event.LavaPlayerStopPlayingEvent
public class LavaPlayerStopPlayingEvent
extends org.bukkit.event.Event
Fired whenever a lavaplayer stops playing, whether stopped manually or finishing naturally.
Note: This event may be triggered asynchronously or from a specific region thread. Any modifications to the world or calls to non-thread-safe Bukkit methods must be wrapped in an appropriate scheduler task (e.g., Global or Region scheduler).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
LavaPlayerStopPlayingEvent
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList() -
getBlock
@NotNull public @NotNull org.bukkit.block.Block getBlock()Returns the block where the music was playing.Thread Safety Warning: Since this event may be fired asynchronously, you must ensure thread safety when interacting with the returned block. Always verify the block state (e.g.,
block.getType()) within a synchronized context or scheduler task, as the block may have been modified or destroyed before the event reached the listener.- Returns:
- The block where the audio originated.
-
getIdentifier
- Returns:
- The identifier (URL or local path) of the track that stopped.
-