- All Superinterfaces:
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
Method SummaryModifier and TypeMethodDescriptionGets the chat router.
booleanCloses the currently viewed entity of this player, if it is currently viewing one.
isOnline()Returns whether this player is online or not.
default booleanReturns whether this player has an open inventory at the moment or not.
kick()Kicks the player, showing the default kick reason (the translation key
booleanKicks the player given a reason.Gets the currently viewed inventory of this player, if it is currently viewing one.Opens the given Inventory for the player to view.Opens a given Inventory for the player to view with a custom displayName.
respawn()Manually respawns the player.
voidSets the chat router.
WorldBorderthat this player sees.Simulates a chat message from a player.
WorldBorderfor this player, if present.
Methods inherited from interface org.spongepowered.api.item.inventory.ArmorEquipable
chest, feet, head, itemInHand, itemInHand, legs, setChest, setFeet, setHead, setItemInHand, setItemInHand, setLegs
Methods inherited from interface org.spongepowered.api.entity.attribute.AttributeHolder
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.spongepowered.api.service.context.Contextual
Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, 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.data.persistence.DataSerializable
Methods inherited from interface org.spongepowered.api.entity.Entity
age, asHoverEvent, baseSize, baseVehicle, boundingBox, canSee, copy, createArchetype, createSnapshot, creator, customName, customNameVisible, damage, damage, direction, displayName, eyeHeight, eyePosition, fallDistance, fireImmuneTicks, fireTicks, glowing, gravityAffected, height, invisible, invulnerabilityTicks, invulnerable, isLoaded, isRemoved, isTransient, lookAt, maxAir, nearbyEntities, nearbyEntities, notifier, onGround, passengers, position, remainingAir, remove, rotation, scale, scoreboardTags, setLocation, setLocationAndRotation, setLocationAndRotation, setPosition, setRotation, setScale, setTransform, silent, sneaking, sprinting, swiftness, transferToWorld, transferToWorld, transform, type, vanishState, vehicle, velocity, wet
Methods inherited from interface org.spongepowered.api.item.inventory.Equipable
canEquip, canEquip, canEquip, canEquip, equip, equip, equipment, equipped, equipped
Methods inherited from interface org.spongepowered.api.entity.living.Living
absorption, activeItem, bodyRotations, canGrief, chestRotation, elytraFlying, headDirection, headRotation, health, lastAttacker, lastDamageReceived, maxHealth, potionEffects, stuckArrows, walkingSpeed
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation
Methods inherited from interface org.spongepowered.api.entity.living.player.Player
affectsSpawning, canFly, dominantHand, enderChestInventory, exhaustion, experience, experienceFromStartToLevel, experienceLevel, experienceSinceLevel, flying, flyingSpeed, foodLevel, identity, inventory, maxExhaustion, maxFoodLevel, maxSaturation, profile, saturation, sleeping, sleepingIgnored, sleepTimer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.spongepowered.api.projectile.source.ProjectileSource
launchProjectile, launchProjectile, launchProjectile, launchProjectile, launchProjectileTo, launchProjectileTo
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutable
Methods inherited from interface org.spongepowered.api.service.permission.Subject
associatedObject, asSubjectReference, containingCollection, contextCause, hasPermission, hasPermission, hasPermission, isChildOf, isChildOf, isChildOf, isSubjectDataPersisted, option, option, option, parents, parents, parents, permissionValue, permissionValue, permissionValue, subjectData, transientSubjectData
Methods inherited from interface org.spongepowered.api.data.value.ValueContainer
get, getDouble, getInt, getKeys, getLong, getOrElse, getOrNull, getValue, getValues, require, requireValue, supports, supports
worldServerWorld world()Description copied from interface:
isOnlineboolean isOnline()Returns whether this player is online or not.
If this returns false, this player should be considered stale and all references to it should be discarded immediately.
- True if online, false if not
isViewingInventorydefault boolean isViewingInventory()Returns whether this player has an open inventory at the moment or not.
- Whether this player is viewing an inventory or not
openInventoryGets the currently viewed inventory of this player, if it is currently viewing one.
- An inventory if this player is viewing one, otherwise
openInventoryOpens the given Inventory for the player to view.
openInventoryOpens a given Inventory for the player to view with a custom displayName.
Note that not all inventories support a custom display name.
inventory- The inventory to view
displayName- The display name to set
- The opened Container if the inventory was opened, otherwise
closeInventoryboolean closeInventory() throws IllegalArgumentExceptionCloses the currently viewed entity of this player, if it is currently viewing one.
- whether or not closing the inventory succeeded
IllegalArgumentException- if a
PluginContaineris not the root of the cause
- The player's view distance
- Chat visibility setting
- Whether colors are enabled in chat
simulateChatSimulates a chat message from a player.
This method sends a message as if it came from this player. To send a message to this player instead, see
If text formatting is not supported in the implementation it will be displayed as plain text.
message- The message to send
cause- The cause for the message
- The event that was thrown from sending the message
- A set of skin parts displayed
- The connection
pack- The ResourcePack to send
- This player's TabList
kickboolean kick()Kicks the player, showing the default kick reason (the translation key
- whether or not kicking the player succeeded
(Component reason)Kicks the player given a reason.
reason- The reason for the kick
- whether or not kicking the player succeeded
- The scoreboard displayed to the player
scoreboard- The scoreboard to display
respawnboolean respawn()Manually respawns the player.
If the player is not dead, this method will return
- Whether the respawn was successful
WorldBorderfor this player, if present. If no border is set, an empty
WorldBorderof this player as an
Optional, if present
WorldBorderthat this player sees. If
null, the border is unset, reverting to the border of the world the player is currently in.
The values that are set may be altered by events, so users should check the returned value if they need to know if an event altered the values in some way. If no alterations were made, the supplied object and the returned object (within the optional) will be the same.
border- The world border to be used, may be
- the values that were actually set, which may be different from those requested. If the result is an empty optional, then the player does not have a personal border, and uses that of the world they are in instead.
- This player's cooldown tracker
advancement- The advancement
- The advancement progress
- The advancement trees
- True if this player has viewed the credits
hasPlayedBeforedefault boolean hasPlayedBefore()
- True if played before, false otherwise
- The entity this player is "spectating"
chatFormatterPlayerChatFormatter chatFormatter()Gets the chat router.
- The chat router
(PlayerChatFormatter router)Sets the chat router.
router- the chat router
- The game mode the player has
- The statistics of the player
- The value the player max-health (excluding absorption) in the GUI will scale to
- The timestamp value when this player first joined
- The last timestamp value when this player has joined
- The last timestamp value when this player has played