notifyclientchatclosed event handled

This commit is contained in:
Manevolent
2019-02-05 08:51:46 -05:00
parent 0fed4c68ce
commit a883c8beef
5 changed files with 32 additions and 1 deletions
@@ -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();