001 package org.bukkit;
002
003 import org.bukkit.configuration.serialization.ConfigurationSerializable;
004 import org.bukkit.entity.AnimalTamer;
005 import org.bukkit.entity.Player;
006 import org.bukkit.permissions.ServerOperator;
007
008 public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
009 /**
010 * Checks if this player is currently online
011 *
012 * @return true if they are online
013 */
014 public boolean isOnline();
015
016 /**
017 * Returns the name of this player
018 *
019 * @return Player name
020 */
021 public String getName();
022
023 /**
024 * Checks if this player is banned or not
025 *
026 * @return true if banned, otherwise false
027 */
028 public boolean isBanned();
029
030 /**
031 * Bans or unbans this player
032 *
033 * @param banned true if banned
034 */
035 public void setBanned(boolean banned);
036
037 /**
038 * Checks if this player is whitelisted or not
039 *
040 * @return true if whitelisted
041 */
042 public boolean isWhitelisted();
043
044 /**
045 * Sets if this player is whitelisted or not
046 *
047 * @param value true if whitelisted
048 */
049 public void setWhitelisted(boolean value);
050
051 /**
052 * Gets a {@link Player} object that this represents, if there is one
053 * <p />
054 * If the player is online, this will return that player. Otherwise,
055 * it will return null.
056 *
057 * @return Online player
058 */
059 public Player getPlayer();
060
061 /**
062 * Gets the first date and time that this player was witnessed on this server.
063 * <p />
064 * If the player has never played before, this will return 0. Otherwise, it will be
065 * the amount of milliseconds since midnight, January 1, 1970 UTC.
066 *
067 * @return Date of first log-in for this player, or 0
068 */
069 public long getFirstPlayed();
070
071 /**
072 * Gets the last date and time that this player was witnessed on this server.
073 * <p />
074 * If the player has never played before, this will return 0. Otherwise, it will be
075 * the amount of milliseconds since midnight, January 1, 1970 UTC.
076 *
077 * @return Date of last log-in for this player, or 0
078 */
079 public long getLastPlayed();
080
081 /**
082 * Checks if this player has played on this server before.
083 *
084 * @return True if the player has played before, otherwise false
085 */
086 public boolean hasPlayedBefore();
087
088 /**
089 * Gets the Location where the player will spawn at their bed, null if they
090 * have not slept in one or their current bed spawn is invalid.
091 *
092 * @return Bed Spawn Location if bed exists, otherwise null.
093 */
094 public Location getBedSpawnLocation();
095
096 }