public interface User extends DataHolder, ArmorEquipable, Tamer, Subject
Modifier and Type | Method and Description |
---|---|
Inventory |
getEnderChestInventory()
Gets the
Inventory available for this Player's shared EnderChest
contents. |
String |
getName()
Gets the player's last known username.
|
Optional<Player> |
getPlayer()
Gets the related online
Player if the player is
in fact online. |
com.flowpowered.math.vector.Vector3d |
getPosition()
Gets the position of this User
|
GameProfile |
getProfile()
Gets the associated
GameProfile of this player. |
com.flowpowered.math.vector.Vector3d |
getRotation()
Gets the rotation.
|
default StatisticData |
getStatisticData()
Gets a copy of the
StatisticData for this user. |
Optional<UUID> |
getWorldUniqueId()
Gets the World UUID of this User.
|
boolean |
isOnline()
Checks if this user is online or not.
|
boolean |
setLocation(com.flowpowered.math.vector.Vector3d position,
UUID world)
Sets the position and world of this User.
|
void |
setRotation(com.flowpowered.math.vector.Vector3d rotation)
Sets the rotation of this entity.
|
setRawData, validateRawData
getContentVersion, toContainer
getApplicableProperties, getProperty
copyFrom, copyFrom, get, getContainers, getOrCreate, offer, offer, offer, offer, offer, offer, remove, remove, remove, require, supports, transform, tryOffer, tryOffer, tryOffer, tryOffer, undo
copy, get, getKeys, getOrElse, getOrNull, getValue, getValues, require, supports, supports
getBoots, getChestplate, getHelmet, getItemInHand, getLeggings, setBoots, setChestplate, setHelmet, setItemInHand, setLeggings
canEquip, canEquip, equip, getEquipped
getUniqueId
getInventory
asSubjectReference, getCommandSource, getContainingCollection, getOption, getOption, getParents, getParents, getPermissionValue, getSubjectData, getTransientSubjectData, hasPermission, hasPermission, isChildOf, isChildOf, isSubjectDataPersisted
getActiveContexts, getFriendlyIdentifier, getIdentifier
GameProfile getProfile()
GameProfile
of this player.String getName()
boolean isOnline()
Optional<Player> getPlayer()
Player
if the player is
in fact online.com.flowpowered.math.vector.Vector3d getPosition()
Optional<UUID> getWorldUniqueId()
May return empty when the world the player is in does not exist anymore
boolean setLocation(com.flowpowered.math.vector.Vector3d position, UUID world)
The UUID must belong to an existing world.
When the User isOnline()
this redirects to Entity.setLocation(Location)
position
- The position to setworld
- The world UUID to setIllegalArgumentException
- When the UUID does not belong to an existing world.void setRotation(com.flowpowered.math.vector.Vector3d rotation)
The format of the rotation is represented by:
x -> pitch
, y -> yaw
, z -> roll
rotation
- The rotation to set the entity tocom.flowpowered.math.vector.Vector3d getRotation()
The format of the rotation is represented by:
x -> pitch
, y -> yaw
, z -> roll
default StatisticData getStatisticData()
StatisticData
for this user.Inventory getEnderChestInventory()
Inventory
available for this Player's shared EnderChest
contents.