Class PluginEventHandler

java.lang.Object
dev.arbjerg.lavalink.api.PluginEventHandler

public abstract class PluginEventHandler
extends java.lang.Object
Must be provided as a bean
  • Constructor Details

  • Method Details

    • onWebSocketOpen

      public void onWebSocketOpen​(ISocketContext context, boolean resumed)
      Fired upon a new WebSocket being opened
      Parameters:
      context - the new websocket
      resumed - if the context was resumed and thus reused
    • onSocketContextPaused

      public void onSocketContextPaused​(ISocketContext context)
      Fired upon a WebSocket being closed while being configured for resuming
      Parameters:
      context - the socket context
    • onSocketContextDestroyed

      public void onSocketContextDestroyed​(ISocketContext context)
      Fired once the WebSocket is closed without being resumable or when a WebSocket can no longer be resumed
      Parameters:
      context - the socket context
    • onWebsocketMessageIn

      public void onWebsocketMessageIn​(ISocketContext context, java.lang.String message)
      Fired upon a WebSocket message being received
      Parameters:
      context - the websocket
      message - the message, presumably in JSON
    • onWebSocketMessageOut

      public void onWebSocketMessageOut​(ISocketContext context, java.lang.String message)
      Fired upon a WebSocket message being sent
      Parameters:
      context - the websocket
      message - the message, presumably in JSON
    • onNewPlayer

      public void onNewPlayer​(ISocketContext context, IPlayer player)
      Fired upon a new player being created
      Parameters:
      context - the websocket
      player - the new player
    • onDestroyPlayer

      public void onDestroyPlayer​(ISocketContext context, IPlayer player)
      Fired upon a player being destroyed
      Parameters:
      context - the websocket
      player - the player to be destroyed