Skip to content

User Join Zone

Ta Van Dung edited this page Jun 14, 2016 · 1 revision
import com.tvd12.ezyfox.core.annotation.ServerEventHandler;
import com.tvd12.ezyfox.core.command.JoinRoom;
import com.tvd12.ezyfox.core.command.Log;
import com.tvd12.ezyfox.core.config.ServerEvent;
import com.tvd12.ezyfox.core.content.AppContext;
import com.tvd12.ezyfox.core.model.ApiZone;

@ServerEventHandler(event = ServerEvent.USER_JOIN_ZONE)
public class UserJoinZoneHandler {

    public void handle(AppContext context, ApiZone zone, VideoPokerUser user) {
        context.command(Log.class).from(this).info(
                "user " + user.getName() + 
                " at ip = " + user.getIp() +
                " join zone " + zone.getName());
        
        // your business
    }
    
}

Hello World

Clone this wiki locally