forked from lavalink-devs/Lavalink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginEventHandler.java
More file actions
61 lines (53 loc) · 1.71 KB
/
PluginEventHandler.java
File metadata and controls
61 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package dev.arbjerg.lavalink.api;
/**
* Must be provided as a bean
*/
public abstract class PluginEventHandler {
/**
* Fired upon a new WebSocket being opened
*
* @param context the new websocket
* @param resumed if the context was resumed and thus reused
*/
public void onWebSocketOpen(ISocketContext context, boolean resumed) {}
/**
* Fired upon a WebSocket being closed while being configured for resuming
*
* @param context the socket context
*/
public void onSocketContextPaused(ISocketContext context) {}
/**
* Fired once the WebSocket is closed without being resumable or when a WebSocket can no longer be resumed
*
* @param context the socket context
*/
public void onSocketContextDestroyed(ISocketContext context) {}
/**
* Fired upon a WebSocket message being received
*
* @param context the websocket
* @param message the message, presumably in JSON
*/
public void onWebsocketMessageIn(ISocketContext context, String message) {}
/**
* Fired upon a WebSocket message being sent
*
* @param context the websocket
* @param message the message, presumably in JSON
*/
public void onWebSocketMessageOut(ISocketContext context, String message) {}
/**
* Fired upon a new player being created
*
* @param context the websocket
* @param player the new player
*/
public void onNewPlayer(ISocketContext context, IPlayer player) {}
/**
* Fired upon a player being destroyed
*
* @param context the websocket
* @param player the player to be destroyed
*/
public void onDestroyPlayer(ISocketContext context, IPlayer player) {}
}