public interface IPCListener
IPCClient.
Can be attached to an IPCClient using
IPCClient.setListener(IPCListener).
| Modifier and Type | Method and Description |
|---|---|
default void |
onActivityJoin(IPCClient client,
java.lang.String secret)
Fired whenever a RichPresence activity informs us that a user has clicked a
"join" button.
|
default void |
onActivityJoinRequest(IPCClient client,
java.lang.String secret,
User user)
Fired whenever a RichPresence activity informs us that a user has clicked a
"ask to join" button.
|
default void |
onActivitySpectate(IPCClient client,
java.lang.String secret)
Fired whenever a RichPresence activity informs us that a user has clicked a
"spectate" button.
|
default void |
onClose(IPCClient client,
JSONObject json)
Fired whenever an
IPCClient has closed. |
default void |
onDisconnect(IPCClient client,
java.lang.Throwable t)
Fired whenever an
IPCClient has disconnected, either due to bad data
or an exception. |
default void |
onPacketReceived(IPCClient client,
Packet packet)
|
default void |
onPacketSent(IPCClient client,
Packet packet)
|
default void |
onReady(IPCClient client)
Fired whenever an
IPCClient is ready and connected to Discord. |
default void onPacketSent(IPCClient client, Packet packet)
client - The IPCClient sending the Packet.packet - The Packet being sent.default void onPacketReceived(IPCClient client, Packet packet)
client - The IPCClient receiving the Packet.packet - The Packet being received.default void onActivityJoin(IPCClient client, java.lang.String secret)
client - The IPCClient receiving the event.secret - The secret of the event, determined by the implementation and
specified by the user.default void onActivitySpectate(IPCClient client, java.lang.String secret)
client - The IPCClient receiving the event.secret - The secret of the event, determined by the implementation and
specified by the user.default void onActivityJoinRequest(IPCClient client, java.lang.String secret, User user)
As opposed to onActivityJoin(IPCClient, String), this also provides
packaged User data.
client - The IPCClient receiving the event.secret - The secret of the event, determined by the implementation and
specified by the user.user - The user who clicked the clicked the event, containing data on the
account.default void onReady(IPCClient client)
IPCClient is ready and connected to Discord.client - The now ready IPCClient.default void onClose(IPCClient client, JSONObject json)
IPCClient has closed.client - The now closed IPCClient.json - A JSONObject with close data.