Skip to content

User Leave Room

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

/**
 * @author tavandung12
 *
 */
// @RoomName("")
@ServerEventHandler(event = ServerEvent.USER_LEAVE_ROOM)
public class UserLeaveRoomHandler {

    public void handle(AppContext context, YourRoom room, YourUser user) {
        context.command(Log.class).from(this).info("user {} left room {}", 
                user.getName(), room.getName());
    }
    
}

Hello World

Clone this wiki locally