All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nadron.client.app.impl.DefaultPlayerSession Maven / Gradle / Ivy

Go to download

This is a client library for Nadron server https://github.com/menacher/java-game-server/tree/netty4/nadron. Java clients can use this program to connect and interact with nadron server.

There is a newer version: 0.5
Show newest version
package io.nadron.client.app.impl;

import io.nadron.client.app.Player;
import io.nadron.client.app.PlayerSession;
import io.nadron.client.event.Event;

/**
 * This implementation of the {@link PlayerSession} interface is used to both
 * receive and send messages to a particular player using the
 * {@link Event}{@link #onEvent(Event)}.
 * 
 * @author Abraham Menacherry
 * 
 */
public class DefaultPlayerSession extends DefaultSession implements PlayerSession
{

	/**
	 * Each player session belongs to a Player. This variable holds the
	 * reference.
	 */
	final protected Player player;

	protected DefaultPlayerSession(SessionBuilder sessionBuilder, Player player)
	{
		super(sessionBuilder);
		this.player = player;
	}

	@Override
	public Player getPlayer()
	{
		return player;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy