Java Extension Create Game 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

epicever
Posts: 6
Joined: 18 Mar 2020, 15:22

Java Extension Create Game Room

Postby epicever » 20 Nov 2020, 03:26

I've checked the docs but nothing has told me what to put for the first parameter of addRequestHandler for the java extension for CreateRoomRequest from clients.

Code: Select all

import com.smartfoxserver.v2.core.SFSEventType;
import com.smartfoxserver.v2.extensions.SFSExtension;

/**
 *
 * @author epice
 */
public class ZoneExtension extends SFSExtension{
   
    @Override
    public void init(){
        addRequestHandler(******WHAT HERE?******, CreateGameRoomHandler.class);
       
    }
}
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Extension Create Game Room

Postby Lapo » 20 Nov 2020, 08:16

Hi,
it's the name of your request, which is arbitrary. In other words, any string you want :)
Check the example in the documentation here:
http://docs2x.smartfoxserver.com/Extens ... uick-start

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 43 guests