2011-09-03 00:48:41 +01:00
|
|
|
package org.bukkit;
|
|
|
|
|
2011-09-19 20:36:44 +01:00
|
|
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
2011-09-20 19:04:45 +01:00
|
|
|
import org.bukkit.entity.AnimalTamer;
|
2011-10-11 14:51:28 +01:00
|
|
|
import org.bukkit.entity.Player;
|
2011-09-03 00:48:41 +01:00
|
|
|
import org.bukkit.permissions.ServerOperator;
|
|
|
|
|
2011-09-19 20:36:44 +01:00
|
|
|
public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
|
2011-09-03 00:48:41 +01:00
|
|
|
/**
|
|
|
|
* Checks if this player is currently online
|
|
|
|
*
|
|
|
|
* @return true if they are online
|
|
|
|
*/
|
|
|
|
public boolean isOnline();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the name of this player
|
|
|
|
*
|
|
|
|
* @return Player name
|
|
|
|
*/
|
|
|
|
public String getName();
|
2011-09-03 02:13:37 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if this player is banned or not
|
|
|
|
*
|
|
|
|
* @return true if banned, otherwise false
|
|
|
|
*/
|
|
|
|
public boolean isBanned();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bans or unbans this player
|
|
|
|
*
|
|
|
|
* @param banned true if banned
|
|
|
|
*/
|
|
|
|
public void setBanned(boolean banned);
|
2011-09-03 04:37:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if this player is whitelisted or not
|
|
|
|
*
|
|
|
|
* @return true if whitelisted
|
|
|
|
*/
|
|
|
|
public boolean isWhitelisted();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets if this player is whitelisted or not
|
|
|
|
*
|
|
|
|
* @param value true if whitelisted
|
|
|
|
*/
|
|
|
|
public void setWhitelisted(boolean value);
|
2011-12-25 16:02:30 +01:00
|
|
|
|
2011-10-11 14:51:28 +01:00
|
|
|
/**
|
|
|
|
* Gets a {@link Player} object that this represents, if there is one
|
2013-04-02 00:11:22 -04:00
|
|
|
* <p>
|
2011-10-11 14:51:28 +01:00
|
|
|
* If the player is online, this will return that player. Otherwise,
|
|
|
|
* it will return null.
|
2011-12-25 16:02:30 +01:00
|
|
|
*
|
2011-10-11 14:51:28 +01:00
|
|
|
* @return Online player
|
|
|
|
*/
|
|
|
|
public Player getPlayer();
|
2011-12-12 17:38:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the first date and time that this player was witnessed on this server.
|
2013-04-02 00:11:22 -04:00
|
|
|
* <p>
|
2011-12-12 17:38:27 +00:00
|
|
|
* If the player has never played before, this will return 0. Otherwise, it will be
|
|
|
|
* the amount of milliseconds since midnight, January 1, 1970 UTC.
|
|
|
|
*
|
|
|
|
* @return Date of first log-in for this player, or 0
|
|
|
|
*/
|
|
|
|
public long getFirstPlayed();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the last date and time that this player was witnessed on this server.
|
2013-04-02 00:11:22 -04:00
|
|
|
* <p>
|
2011-12-12 17:38:27 +00:00
|
|
|
* If the player has never played before, this will return 0. Otherwise, it will be
|
|
|
|
* the amount of milliseconds since midnight, January 1, 1970 UTC.
|
|
|
|
*
|
|
|
|
* @return Date of last log-in for this player, or 0
|
|
|
|
*/
|
|
|
|
public long getLastPlayed();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if this player has played on this server before.
|
|
|
|
*
|
|
|
|
* @return True if the player has played before, otherwise false
|
|
|
|
*/
|
|
|
|
public boolean hasPlayedBefore();
|
2012-01-17 22:39:37 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the Location where the player will spawn at their bed, null if they
|
|
|
|
* have not slept in one or their current bed spawn is invalid.
|
|
|
|
*
|
|
|
|
* @return Bed Spawn Location if bed exists, otherwise null.
|
|
|
|
*/
|
|
|
|
public Location getBedSpawnLocation();
|
|
|
|
|
2011-09-03 00:48:41 +01:00
|
|
|
}
|