Interface User
- 
- All Superinterfaces:
- ArmorEquipable,- Carrier,- Contextual,- DataHolder,- DataHolder.Mutable,- Equipable,- Identifiable,- Nameable,- Subject,- Tamer,- ValueContainer
 
 @DoNotStore public interface User extends DataHolder.Mutable, ArmorEquipable, Tamer, Subject, Carrier A User is the data usually associated with a Player that is persisted across server restarts. This is in contrast to Player which represents the in-game entity associated with an online User.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description InventoryenderChestInventory()Gets theInventoryavailable for this Player's sharedEnderChestcontents.default Optional<Value.Mutable<Instant>>firstJoined()CarriedInventory<? extends Carrier>inventory()Returns the inventory that this Carrier is holding.default Value.Mutable<Boolean>invisible()default Value.Mutable<Boolean>invulnerable()booleanisOnline()Checks if this user is online or not.default Optional<Value.Mutable<Instant>>lastJoined()Stringname()Gets the player's last known username.Optional<ServerPlayer>player()Gets the related onlineplayerif the player is in fact online.Vector3dposition()Gets the position of this UserGameProfileprofile()Gets the associatedGameProfileof this player.default MapValue.Mutable<ResourceKey,RespawnLocation>respawnLocations()Vector3drotation()Gets the rotation.booleansetLocation(ResourceKey world, Vector3d position)Sets the world and position of this User.voidsetRotation(Vector3d rotation)Sets the rotation of this entity.default Value.Mutable<Boolean>vanish()Deprecated.default Value.Mutable<Boolean>vanishIgnoresCollision()Deprecated.default Value.Mutable<Boolean>vanishPreventsTargeting()Deprecated.default Value.Mutable<VanishState>vanishState()ResourceKeyworldKey()Gets the worldkeyof this User.- 
Methods inherited from interface org.spongepowered.api.item.inventory.ArmorEquipablechest, feet, head, itemInHand, itemInHand, legs, setChest, setFeet, setHead, setItemInHand, setItemInHand, setLegs
 - 
Methods inherited from interface org.spongepowered.api.service.context.ContextualfriendlyIdentifier, identifier
 - 
Methods inherited from interface org.spongepowered.api.data.DataHolder.MutablecopyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
 - 
Methods inherited from interface org.spongepowered.api.item.inventory.EquipablecanEquip, canEquip, canEquip, canEquip, equip, equip, equipment, equipped, equipped
 - 
Methods inherited from interface org.spongepowered.api.util.IdentifiableuniqueId
 - 
Methods inherited from interface org.spongepowered.api.service.permission.SubjectassociatedObject, asSubjectReference, containingCollection, contextCause, hasPermission, hasPermission, hasPermission, isChildOf, isChildOf, isChildOf, isSubjectDataPersisted, option, option, option, parents, parents, parents, permissionValue, permissionValue, permissionValue, subjectData, transientSubjectData
 
- 
 
- 
- 
- 
Method Detail- 
profileGameProfile profile() Gets the associatedGameProfileof this player.- Returns:
- The user's profile
 
 - 
nameString name() Gets the player's last known username.
 - 
isOnlineboolean isOnline() Checks if this user is online or not.- Returns:
- True if the corresponding player is online
 
 - 
playerOptional<ServerPlayer> player() Gets the related onlineplayerif the player is in fact online.- Returns:
- The associated online player, if available
 
 - 
positionVector3d position() Gets the position of this User- Returns:
- The position of this User
 
 - 
worldKeyResourceKey worldKey() Gets the worldkeyof this User.- Returns:
- The key, if found
 
 - 
setLocationboolean setLocation(ResourceKey world, Vector3d position) Sets the world and position of this User.The keymust belong to an existing world.When the User isOnline()this redirects toEntity.setLocation(ServerLocation)- Parameters:
- position- The position to set
- world- The world key
- Returns:
- True if the location was accepted
 
 - 
setRotationvoid setRotation(Vector3d rotation) Sets the rotation of this entity.The format of the rotation is represented by: x -> pitch,y -> yaw,z -> roll- Parameters:
- rotation- The rotation to set the entity to
 
 - 
rotationVector3d rotation() Gets the rotation.The format of the rotation is represented by: x -> pitch,y -> yaw,z -> roll- Returns:
- The rotation
 
 - 
inventoryCarriedInventory<? extends Carrier> inventory() Returns the inventory that this Carrier is holding. Note that this may be either aPlayerInventoryorUserInventory, depending on whether the user is online or not.
 - 
enderChestInventoryInventory enderChestInventory() Gets theInventoryavailable for this Player's sharedEnderChestcontents.- Returns:
- The ender chest inventory
 
 - 
respawnLocationsdefault MapValue.Mutable<ResourceKey,RespawnLocation> respawnLocations() - Returns:
- The spawn locations of the user may have for various worlds
 
 - 
firstJoineddefault Optional<Value.Mutable<Instant>> firstJoined() - Returns:
- The timestamp value when this user first joined
 
 - 
lastJoineddefault Optional<Value.Mutable<Instant>> lastJoined() - Returns:
- The last timestamp value when this user has joined
 
 - 
invulnerabledefault Value.Mutable<Boolean> invulnerable() - Returns:
- Whether the user is invulnerable
 
 - 
invisibledefault Value.Mutable<Boolean> invisible() - Returns:
- Whether the user is invisible
 
 - 
vanishStatedefault Value.Mutable<VanishState> vanishState() 
 - 
vanish@Deprecated default Value.Mutable<Boolean> vanish() Deprecated.- Returns:
- Whether the user is vanished
 
 - 
vanishIgnoresCollision@Deprecated default Value.Mutable<Boolean> vanishIgnoresCollision() Deprecated.- Returns:
- Whether the user ignores collision with other entities
 
 - 
vanishPreventsTargeting@Deprecated default Value.Mutable<Boolean> vanishPreventsTargeting() Deprecated.- Returns:
- Whether the user can be targeted for attack by another entity
 
 
- 
 
-