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
ConstructorsConstructorDescriptionGlowOfflinePlayer(GlowServer server, GlowPlayerProfile profile) Create a new offline player for the given name. -
Method Summary
Modifier and TypeMethodDescriptionvoiddecrementStatistic(org.bukkit.Statistic statistic) voiddecrementStatistic(org.bukkit.Statistic statistic, int amount) voiddecrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) voiddecrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) voiddecrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) voiddecrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) static org.bukkit.OfflinePlayerdeserialize(Map<String, Object> val) Required method for configuration serialization.booleanorg.bukkit.LocationlonglonglonglonggetName()static CompletableFuture<GlowOfflinePlayer>getOfflinePlayer(GlowServer server, UUID uuid) Returns a Future for a GlowOfflinePlayer by UUID.org.bukkit.entity.PlayerintgetStatistic(org.bukkit.Statistic statistic) intgetStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) intgetStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) inthashCode()booleanvoidincrementStatistic(org.bukkit.Statistic statistic) voidincrementStatistic(org.bukkit.Statistic statistic, int amount) voidincrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) voidincrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) voidincrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) voidincrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) booleanisBanned()booleanisOnline()booleanisOp()booleanvoidsetOp(boolean value) voidsetStatistic(org.bukkit.Statistic statistic, int newValue) voidsetStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) voidsetStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) voidsetWhitelisted(boolean value) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
GlowOfflinePlayerfuture.
-
deserialize
Required method for configuration serialization.- Parameters:
val- map to deserialize- Returns:
- deserialized player record
- See Also:
-
ConfigurationSerializable
-
getName
- Specified by:
getNamein interfaceorg.bukkit.entity.AnimalTamer- Specified by:
getNamein interfaceorg.bukkit.OfflinePlayer
-
getUniqueId
- Specified by:
getUniqueIdin interfaceorg.bukkit.entity.AnimalTamer- Specified by:
getUniqueIdin interfaceorg.bukkit.OfflinePlayer
-
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceorg.bukkit.OfflinePlayer
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Specified by:
getPlayerin interfaceorg.bukkit.OfflinePlayer
-
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBeforein interfaceorg.bukkit.OfflinePlayer
-
getLastSeen
public long getLastSeen()- Specified by:
getLastSeenin interfaceorg.bukkit.OfflinePlayer
-
isBanned
public boolean isBanned()- Specified by:
isBannedin interfaceorg.bukkit.OfflinePlayer
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelistedin interfaceorg.bukkit.OfflinePlayer
-
setWhitelisted
public void setWhitelisted(boolean value) - Specified by:
setWhitelistedin interfaceorg.bukkit.OfflinePlayer
-
getStatistic
- Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
getStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, int newValue) throws IllegalArgumentException - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) throws IllegalArgumentException - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) - Specified by:
setStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, int amount) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) throws IllegalArgumentException - Specified by:
incrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
- Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, int amount) throws IllegalArgumentException - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) throws IllegalArgumentException - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) - Specified by:
decrementStatisticin interfaceorg.bukkit.OfflinePlayer
-
getStatisticMap
-
isOp
public boolean isOp()- Specified by:
isOpin interfaceorg.bukkit.permissions.ServerOperator
-
setOp
public void setOp(boolean value) - Specified by:
setOpin interfaceorg.bukkit.permissions.ServerOperator
-
serialize
- Specified by:
serializein interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
equals
-
hashCode
public int hashCode() -
toString
-
getProfile
-
getFirstPlayed
public long getFirstPlayed()- Specified by:
getFirstPlayedin interfaceorg.bukkit.OfflinePlayer
-
getLastPlayed
public long getLastPlayed()- Specified by:
getLastPlayedin interfaceorg.bukkit.OfflinePlayer
-
getLastLogin
public long getLastLogin()- Specified by:
getLastLoginin interfaceorg.bukkit.OfflinePlayer
-
getBedSpawnLocation
public org.bukkit.Location getBedSpawnLocation()- Specified by:
getBedSpawnLocationin interfaceorg.bukkit.OfflinePlayer
-