Leave Room what sort of room?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
LordDawn
Posts: 38
Joined: 15 Apr 2019, 08:36

Leave Room what sort of room?

Postby LordDawn » 04 May 2019, 15:40

I have a handler to deal with USER_LEAVE_ROOM events on the server, which can get the parameter

Room room = (Room) event.getParameter(SFSEventParam.ROOM);

But how do I tell if the room is an MMORoom as I have a mixture of MMORooms and ordinary Rooms. What's the best method for determining the room type?
User avatar
Rob
Posts: 34
Joined: 01 Jul 2017, 07:33

Re: Leave Room what sort of room?

Postby Rob » 04 May 2019, 19:36

Code: Select all

if (room instanceof MMORoom) {
   // your code
}
User avatar
LordDawn
Posts: 38
Joined: 15 Apr 2019, 08:36

Re: Leave Room what sort of room?

Postby LordDawn » 04 May 2019, 20:16

Ahh, brilliant. Thank you.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 23 guests