Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.OfflinePlayer Interface Reference
Inheritance diagram for org.bukkit.OfflinePlayer:
org.bukkit.permissions.ServerOperator org.bukkit.entity.AnimalTamer org.bukkit.configuration.serialization.ConfigurationSerializable org.bukkit.entity.Player

Public Member Functions

boolean isOnline ()
 
String getName ()
 
UUID getUniqueId ()
 
boolean isBanned ()
 
void setBanned (boolean banned)
 
boolean isWhitelisted ()
 
void setWhitelisted (boolean value)
 
Player getPlayer ()
 
long getFirstPlayed ()
 
long getLastPlayed ()
 
boolean hasPlayedBefore ()
 
Location getBedSpawnLocation ()
 
- Public Member Functions inherited from org.bukkit.permissions.ServerOperator
boolean isOp ()
 
void setOp (boolean value)
 
- Public Member Functions inherited from org.bukkit.configuration.serialization.ConfigurationSerializable
Map< String, Object > serialize ()
 

Detailed Description

Definition at line 11 of file OfflinePlayer.java.

Member Function Documentation

Location org.bukkit.OfflinePlayer.getBedSpawnLocation ( )

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.

Returns
Bed Spawn Location if bed exists, otherwise null.

Implemented in org.bukkit.entity.Player.

long org.bukkit.OfflinePlayer.getFirstPlayed ( )

Gets the first date and time that this player was witnessed on this server.

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.

Returns
Date of first log-in for this player, or 0
long org.bukkit.OfflinePlayer.getLastPlayed ( )

Gets the last date and time that this player was witnessed on this server.

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.

Returns
Date of last log-in for this player, or 0
String org.bukkit.OfflinePlayer.getName ( )

Returns the name of this player

Names are no longer unique past a single game session. For persistent storage it is recommended that you use getUniqueId() instead.

Returns
Player name or null if we have not seen a name for this player yet

Implements org.bukkit.entity.AnimalTamer.

Player org.bukkit.OfflinePlayer.getPlayer ( )

Gets a Player object that this represents, if there is one

If the player is online, this will return that player. Otherwise, it will return null.

Returns
Online player
UUID org.bukkit.OfflinePlayer.getUniqueId ( )

Returns the UUID of this player

Returns
Player UUID

Implements org.bukkit.entity.AnimalTamer.

boolean org.bukkit.OfflinePlayer.hasPlayedBefore ( )

Checks if this player has played on this server before.

Returns
True if the player has played before, otherwise false
boolean org.bukkit.OfflinePlayer.isBanned ( )

Checks if this player is banned or not

Returns
true if banned, otherwise false
boolean org.bukkit.OfflinePlayer.isOnline ( )

Checks if this player is currently online

Returns
true if they are online
boolean org.bukkit.OfflinePlayer.isWhitelisted ( )

Checks if this player is whitelisted or not

Returns
true if whitelisted
void org.bukkit.OfflinePlayer.setBanned ( boolean  banned)

Bans or unbans this player

Parameters
bannedtrue if banned
Deprecated:
Use String, Date, String) or org.bukkit.BanList#pardon(String) to enhance functionality
void org.bukkit.OfflinePlayer.setWhitelisted ( boolean  value)

Sets if this player is whitelisted or not

Parameters
valuetrue if whitelisted

The documentation for this interface was generated from the following file: