Class SquaremapOnlinePlayer
java.lang.Object
io.github.emcw.common.Entity
io.github.emcw.squaremap.entities.SquaremapOnlinePlayer
- All Implemented Interfaces:
 IGsonSerializable,ILocatable<SquaremapOnlinePlayer>
- Direct Known Subclasses:
 SquaremapOnlineResident
public class SquaremapOnlinePlayer
extends Entity
implements ILocatable<SquaremapOnlinePlayer>, IGsonSerializable
- 
Field Summary
Fields inherited from interface io.github.emcw.interfaces.ILocatable
INT_ARRAY_X, INT_ARRAY_Z - 
Constructor Summary
ConstructorsConstructorDescriptionSquaremapOnlinePlayer(com.google.gson.JsonObject opInfo) Use when we need to create a new online player from raw data.Copy constructor.
Use when a class extends this class and other data needs to be merged. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this player has set a nickname.booleanIf this player is visible on the map.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.emcw.interfaces.IGsonSerializable
asStringMethods inherited from interface io.github.emcw.interfaces.ILocatable
getNearbyEntities, getNearbyEntities 
- 
Constructor Details
- 
SquaremapOnlinePlayer
Copy constructor.
Use when a class extends this class and other data needs to be merged. For example,SquaremapOnlineResidentcalls super (this constructor) then mergesSquaremapResident.- Parameters:
 op- The existing online player.
 - 
SquaremapOnlinePlayer
public SquaremapOnlinePlayer(com.google.gson.JsonObject opInfo) Use when we need to create a new online player from raw data.- Parameters:
 opInfo- The JSON data containing info about an online player.
 
 - 
 - 
Method Details
- 
hasCustomName
public boolean hasCustomName()If this player has set a nickname.- Returns:
 - true/false if 
displayNameis same as their accountEntity.name. 
 - 
isInOverworld
public boolean isInOverworld()If this player is visible on the map.- Returns:
 - true/false if 
worldis "earth" and player is not under a block. 
 - 
facingDirection
- Throws:
 IllegalArgumentException
 
 -