Package io.github.emcw.map.entities
Class Player
- All Implemented Interfaces:
ILocatable<Player>
,ISerializable
- Direct Known Subclasses:
Resident
-
Field Summary
Fields inherited from interface io.github.emcw.interfaces.ILocatable
INT_ARRAY_X, INT_ARRAY_Z
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If this player has set a nickname.boolean
hidden()
Essentially the opposite ofvisible()
.boolean
Check if this player is also a resident on the map this instance was retrieved from.boolean
Whether this player is located at the default map location.void
setLocation
(com.google.gson.JsonObject obj, @NotNull Boolean parsed) boolean
visible()
If this player is visible on the Dynmap.Methods inherited from class io.github.emcw.map.entities.BaseEntity
setInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.emcw.interfaces.ILocatable
getNearby, getNearby
Methods inherited from interface io.github.emcw.interfaces.ISerializable
asString
-
Constructor Details
-
Player
public Player(com.google.gson.JsonObject obj) -
Player
-
Player
-
Player
-
-
Method Details
-
setLocation
-
hasCustomNickname
public boolean hasCustomNickname()If this player has set a nickname.- Returns:
- true/false if
nickname
is same as their accountBaseEntity.name
.
-
visible
public boolean visible()If this player is visible on the Dynmap.- Returns:
- true/false if
world
is "earth" and player is not under a block.
-
locationIsDefault
public boolean locationIsDefault()Whether this player is located at the default map location.- Returns:
- true/false if
location
is 0, 0
-
isResident
public boolean isResident()Check if this player is also a resident on the map this instance was retrieved from.
-