Page 1 of 1

IPlayerIdGenerator

Posted: 25 Jul 2024, 18:34
by dashanddot
Hi!

I implemented my extention and added class with IPlayerIdGenerator interface

i set "Player's ID generator class" in Advanced tab of admin

but server says that class not found, but class is 100% inside of extention

Re: IPlayerIdGenerator

Posted: 26 Jul 2024, 15:14
by Lapo
Hi,
the class must be loaded by the system class loader, while Extensions are loaded by a separate class loaders.
In order for your custom class to be seen by SmartFox it should deployed separately in a different jar, under the extensions/__lib__/ folder.

This way it can be seen both by the server, and Extensions (if necessary)

Hope it helps

Re: IPlayerIdGenerator

Posted: 29 Sep 2024, 11:12
by dashanddot
i think you should add this info to docs! thanx

i made this HACK:

SERVER_READY event:
getParentExtension().getParentZone().getRoomManager().setDefaultRoomPlayerIdGeneratorClass( MyIdGenerator.class );