public abstract class BaseEvent extends Wrapper implements TS3Event
| Modifier | Constructor and Description |
|---|---|
protected |
BaseEvent(Wrapper wrapper) |
| Modifier and Type | Method and Description |
|---|---|
int |
getInvokerId()
Gets the ID of the client who caused this event to happen.
|
String |
getInvokerName()
Gets the nickname of the client who caused this event to happen.
|
String |
getInvokerUniqueId()
Gets the unique identifier of the client who caused this event to happen.
|
int |
getReasonId()
Gets the reason ID of the cause of this event.
|
String |
getReasonMessage()
Gets the reason for this event.
|
get, get, getBoolean, getBoolean, getDouble, getDouble, getInt, getInt, getLong, getLong, getMap, toStringpublic int getInvokerId()
Because not all events are caused by clients, not all events have an invoker.
Most importantly, client events (i.e. ClientJoinEvent, ClientLeaveEvent
ClientMovedEvent) do not have an invoker if a client joined,
quit or changed channels themselves. These values are only present if another client
caused the event to happen by moving, kicking or banning a client.
If the event response does not contain an invoker, this method will return -1.
-1 if the event does not contain an invokerpublic String getInvokerName()
Because not all events are caused by clients, not all events have an invoker.
Most importantly, client events (i.e. ClientJoinEvent, ClientLeaveEvent
ClientMovedEvent) do not have an invoker if a client joined,
quit or changed channels themselves. These values are only present if another client
caused the event to happen by moving, kicking or banning a client.
If the event response does not contain an invoker, this method will return an empty string.
public String getInvokerUniqueId()
Because not all events are caused by clients, not all events have an invoker.
Most importantly, client events (i.e. ClientJoinEvent, ClientLeaveEvent
ClientMovedEvent) do not have an invoker if a client joined,
quit or changed channels themselves. These values are only present if another client
caused the event to happen by moving, kicking or banning a client.
If the event response does not contain an invoker, this method will return an empty string.
public int getReasonId()
Here's an incomplete list of known reason IDs:
| ID | Description |
|---|---|
| -1 | No reason present |
| 0 | No external cause |
| 1 | Client was moved (by other client / by creating a new channel) |
| 3 | Client timed out |
| 4 | Client kicked from a channel or channel deleted |
| 5 | Client kicked from the server |
| 6 | Client banned from the server |
| 8 | Client left the server (no external cause) |
| 10 | Virtual server or channel edited |
| 11 | Server shut down |
public String getReasonMessage()
In case of a client getting kicked or banned, this will return the user-provided reason.
Released under the MIT license.