ROOM_CREATE_REQUESTED event

28 views
Skip to first unread message

kla...@gmail.com

unread,
Oct 26, 2020, 11:29:35 AM10/26/20
to Union Platform
hi!

i am working on a server module and i am listening to two events:

1. CLIENT_ADDED
2. ROOM_CREATE_REQUESTED

when the first event is dispatched, i can access the event.getClient().getClientID() (or whatever property/method) because the getClient() is returning a result

However in the second event there is no trace of the client, i can not request the getClientID() nor the getAttribute on the client (because obviously it isn't there :) )

the code is very simple:

server.addEventListener(ServerEvent.ROOM_CREATE_REQUESTED, this, "onRoomCreateBefore");

public void onRoomCreateBefore(ServerEvent evt) {
       
        log.info(evt.getClient().getClientID());
    }

what am i doing wrong? 

kind regards
Willem
Reply all
Reply to author
Forward
0 new messages