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
    Constructor
    Description
    LavaPlayerStopPlayingEvent(org.bukkit.block.Block block, String identifier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.block.Block
    Returns the block where the music was playing.
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    @NotNull String
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • LavaPlayerStopPlayingEvent

      public LavaPlayerStopPlayingEvent(org.bukkit.block.Block block, String identifier)
  • Method Details

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.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

      @NotNull public @NotNull String getIdentifier()
      Returns:
      The identifier (URL or local path) of the track that stopped.