notifyclientchatclosed event handled
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.github.manevolent.ts3j.event;
|
||||
|
||||
import com.github.manevolent.ts3j.api.ClientProperty;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ClientChatClosedEvent extends BaseEvent {
|
||||
public ClientChatClosedEvent(Map<String, String> map) {
|
||||
super(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fire(TS3Listener listener) {
|
||||
listener.onClientChatClosed(this);
|
||||
}
|
||||
|
||||
public int getClientId() {
|
||||
return getInt("clid");
|
||||
}
|
||||
|
||||
public String getUniqueClientIdentifier() {
|
||||
return get("cluid");
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,8 @@ public interface TS3Event {
|
||||
return new ClientPokeEvent(command.toMap());
|
||||
case "notifyclientchatcomposing": // CLIENT
|
||||
return new ClientChatComposingEvent(command.toMap());
|
||||
case "notifyclientchatclosed": // CLIENT
|
||||
return new ClientChatClosedEvent(command.toMap());
|
||||
case "notifypermissionlist": // CLIENT
|
||||
return new PermissionListEvent(command.toMap());
|
||||
default:
|
||||
|
||||
@@ -54,4 +54,5 @@ public interface TS3Listener {
|
||||
default void onClientComposing(ClientChatComposingEvent e) {}
|
||||
default void onPermissionList(PermissionListEvent e) {}
|
||||
default void onConnected(ConnectedEvent e) {}
|
||||
default void onClientChatClosed(ClientChatClosedEvent e) {}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ public class ServerConnectionTest {
|
||||
|
||||
client.subscribeAll();
|
||||
|
||||
Thread.sleep(100000);
|
||||
|
||||
client.disconnect("BYE");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user