Package net.glowstone
Class GlowOfflinePlayer
java.lang.Object
net.glowstone.GlowOfflinePlayer
- All Implemented Interfaces:
org.bukkit.configuration.serialization.ConfigurationSerializable
,org.bukkit.entity.AnimalTamer
,org.bukkit.OfflinePlayer
,org.bukkit.permissions.ServerOperator
Represents a player which is not connected to the server.
-
Constructor Summary
ConstructorDescriptionGlowOfflinePlayer
(GlowServer server, GlowPlayerProfile profile) Create a new offline player for the given name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decrementStatistic
(org.bukkit.Statistic statistic) void
decrementStatistic
(org.bukkit.Statistic statistic, int amount) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) static org.bukkit.OfflinePlayer
deserialize
(Map<String, Object> val) Required method for configuration serialization.boolean
org.bukkit.Location
long
long
long
long
getName()
static CompletableFuture<GlowOfflinePlayer>
getOfflinePlayer
(GlowServer server, UUID uuid) Returns a Future for a GlowOfflinePlayer by UUID.org.bukkit.entity.Player
int
getStatistic
(org.bukkit.Statistic statistic) int
getStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) int
getStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) int
hashCode()
boolean
void
incrementStatistic
(org.bukkit.Statistic statistic) void
incrementStatistic
(org.bukkit.Statistic statistic, int amount) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) boolean
isBanned()
boolean
isOnline()
boolean
isOp()
boolean
void
setOp
(boolean value) void
setStatistic
(org.bukkit.Statistic statistic, int newValue) void
setStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) void
setStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) void
setWhitelisted
(boolean value) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.OfflinePlayer
banPlayer, banPlayer, banPlayer, banPlayer, banPlayer
-
Constructor Details
-
GlowOfflinePlayer
Create a new offline player for the given name. If possible, the player's data will be loaded.- Parameters:
server
- The server of the offline player. Must not be null.profile
- The profile associated with the player. Must not be null.
-
-
Method Details
-
getOfflinePlayer
Returns a Future for a GlowOfflinePlayer by UUID. If possible, the player's data (including name) will be loaded based on the UUID.- Parameters:
server
- The server of the offline player. Must not be null.uuid
- The UUID of the player. Must not be null.- Returns:
- A
GlowOfflinePlayer
future.
-
deserialize
Required method for configuration serialization.- Parameters:
val
- map to deserialize- Returns:
- deserialized player record
- See Also:
-
ConfigurationSerializable
-
getName
- Specified by:
getName
in interfaceorg.bukkit.entity.AnimalTamer
- Specified by:
getName
in interfaceorg.bukkit.OfflinePlayer
-
getUniqueId
- Specified by:
getUniqueId
in interfaceorg.bukkit.entity.AnimalTamer
- Specified by:
getUniqueId
in interfaceorg.bukkit.OfflinePlayer
-
isOnline
public boolean isOnline()- Specified by:
isOnline
in interfaceorg.bukkit.OfflinePlayer
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Specified by:
getPlayer
in interfaceorg.bukkit.OfflinePlayer
-
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBefore
in interfaceorg.bukkit.OfflinePlayer
-
getLastSeen
public long getLastSeen()- Specified by:
getLastSeen
in interfaceorg.bukkit.OfflinePlayer
-
isBanned
public boolean isBanned()- Specified by:
isBanned
in interfaceorg.bukkit.OfflinePlayer
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelisted
in interfaceorg.bukkit.OfflinePlayer
-
setWhitelisted
public void setWhitelisted(boolean value) - Specified by:
setWhitelisted
in interfaceorg.bukkit.OfflinePlayer
-
getStatistic
- Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, int newValue) throws IllegalArgumentException - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) throws IllegalArgumentException - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, int amount) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) throws IllegalArgumentException - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
- Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, int amount) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
getStatisticMap
-
isOp
public boolean isOp()- Specified by:
isOp
in interfaceorg.bukkit.permissions.ServerOperator
-
setOp
public void setOp(boolean value) - Specified by:
setOp
in interfaceorg.bukkit.permissions.ServerOperator
-
serialize
- Specified by:
serialize
in interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
equals
-
hashCode
public int hashCode() -
toString
-
getProfile
-
getFirstPlayed
public long getFirstPlayed()- Specified by:
getFirstPlayed
in interfaceorg.bukkit.OfflinePlayer
-
getLastPlayed
public long getLastPlayed()- Specified by:
getLastPlayed
in interfaceorg.bukkit.OfflinePlayer
-
getLastLogin
public long getLastLogin()- Specified by:
getLastLogin
in interfaceorg.bukkit.OfflinePlayer
-
getBedSpawnLocation
public org.bukkit.Location getBedSpawnLocation()- Specified by:
getBedSpawnLocation
in interfaceorg.bukkit.OfflinePlayer
-