2015-12-11 07:24:16 +01:00
|
|
|
package mineplex.cache.player;
|
2015-03-25 23:10:59 +01:00
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
2015-08-29 06:44:00 +02:00
|
|
|
import mineplex.serverdata.Utility;
|
2015-03-25 23:10:59 +01:00
|
|
|
import mineplex.serverdata.data.Data;
|
|
|
|
|
|
|
|
public class PlayerInfo implements Data
|
|
|
|
{
|
|
|
|
private int _id;
|
2015-08-29 05:58:58 +02:00
|
|
|
private int _accountId;
|
2015-03-25 23:10:59 +01:00
|
|
|
private UUID _uuid;
|
|
|
|
private String _name;
|
|
|
|
private boolean _online;
|
|
|
|
private long _lastUniqueLogin;
|
|
|
|
private long _loginTime;
|
|
|
|
private int _sessionId;
|
|
|
|
private int _version;
|
|
|
|
|
|
|
|
public PlayerInfo(int id, UUID uuid, String name, int version)
|
|
|
|
{
|
|
|
|
_id = id;
|
|
|
|
_uuid = uuid;
|
|
|
|
_name = name;
|
|
|
|
_version = version;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getDataId()
|
|
|
|
{
|
|
|
|
return _uuid.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getId()
|
|
|
|
{
|
|
|
|
return _id;
|
|
|
|
}
|
|
|
|
|
2015-08-29 05:58:58 +02:00
|
|
|
public int getAccountId()
|
|
|
|
{
|
|
|
|
return _accountId;
|
|
|
|
}
|
|
|
|
|
2015-03-25 23:10:59 +01:00
|
|
|
public UUID getUUID()
|
|
|
|
{
|
|
|
|
return _uuid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getName()
|
|
|
|
{
|
|
|
|
return _name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean getOnline()
|
|
|
|
{
|
|
|
|
return _online;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getLastUniqueLogin()
|
|
|
|
{
|
|
|
|
return _lastUniqueLogin;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getLoginTime()
|
|
|
|
{
|
|
|
|
return _loginTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getSessionId()
|
|
|
|
{
|
|
|
|
return _sessionId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getVersion()
|
|
|
|
{
|
|
|
|
return _version;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSessionId(int sessionId)
|
|
|
|
{
|
|
|
|
_sessionId = sessionId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setName(String name)
|
|
|
|
{
|
|
|
|
_name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVersion(int version)
|
|
|
|
{
|
|
|
|
_version = version;
|
|
|
|
}
|
2015-08-29 05:58:58 +02:00
|
|
|
|
|
|
|
public void setAccountId(int accountId)
|
|
|
|
{
|
|
|
|
_accountId = accountId;
|
|
|
|
}
|
2015-08-29 06:44:00 +02:00
|
|
|
|
|
|
|
public void updateLoginTime()
|
|
|
|
{
|
|
|
|
_loginTime = Utility.currentTimeMillis();
|
|
|
|
}
|
2015-03-25 23:10:59 +01:00
|
|
|
}
|