package sfs3.extensions.examples.shooter.handlers;

import com.smartfoxserver.core.ISFSEvent;
import com.smartfoxserver.core.SFSEventParam;
import com.smartfoxserver.entities.User;
import com.smartfoxserver.exceptions.SFSException;
import com.smartfoxserver.extensions.BaseServerEventHandler;

import sfs3.extensions.examples.shooter.simulation.World;
import sfs3.extensions.examples.shooter.utils.RoomHelper;

public class OnUserGoneHandler extends BaseServerEventHandler
{
	@Override
	public void handleServerEvent(ISFSEvent event) throws SFSException
	{
		User user = (User) event.getParameter(SFSEventParam.USER);
		World world = RoomHelper.getWorld(this);
		world.userLeft(user);
	}

}
