Package net.glowstone.entity
Class GlowPlayer
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.GlowLivingEntity
net.glowstone.entity.GlowHumanEntity
net.glowstone.entity.GlowPlayer
- All Implemented Interfaces:
com.destroystokyo.paper.network.NetworkClient
,net.kyori.adventure.audience.Audience
,net.kyori.adventure.identity.Identified
,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>
,org.bukkit.attribute.Attributable
,org.bukkit.command.CommandSender
,org.bukkit.configuration.serialization.ConfigurationSerializable
,org.bukkit.conversations.Conversable
,org.bukkit.entity.AnimalTamer
,org.bukkit.entity.Damageable
,org.bukkit.entity.Entity
,org.bukkit.entity.HumanEntity
,org.bukkit.entity.LivingEntity
,org.bukkit.entity.Player
,org.bukkit.inventory.InventoryHolder
,org.bukkit.metadata.Metadatable
,org.bukkit.Nameable
,org.bukkit.OfflinePlayer
,org.bukkit.permissions.Permissible
,org.bukkit.permissions.ServerOperator
,org.bukkit.persistence.PersistentDataHolder
,org.bukkit.plugin.messaging.PluginMessageRecipient
,org.bukkit.projectiles.ProjectileSource
Represents an in-game player.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot
Nested classes/interfaces inherited from interface org.bukkit.entity.Player
org.bukkit.entity.Player.Spigot
-
Field Summary
Modifier and TypeFieldDescriptionboolean
static final int
Max distance of a fishing hook.org.bukkit.Location
Fields inherited from class net.glowstone.entity.GlowHumanEntity
permissions, sleeping
Fields inherited from class net.glowstone.entity.GlowLivingEntity
deathTicks, health, maxHealth, movement, speed, taskManager
Fields inherited from class net.glowstone.entity.GlowEntity
active, airDrag, applyDragBeforeAccel, boundingBox, ENTITY_ID_NOBODY, entityId, gravityAccel, liquidDrag, location, metadata, passengerChanged, previousLocation, removed, server, slipMultiplier, teleported, ticksLived, vehicle, velocity, velocityChanged, world, worldLock
-
Constructor Summary
ConstructorDescriptionGlowPlayer
(GlowSession session, GlowPlayerProfile profile, PlayerDataService.PlayerReader reader) Creates a new player and adds it to the world. -
Method Summary
Modifier and TypeMethodDescriptionvoid
abandonConversation
(org.bukkit.conversations.Conversation conversation) void
abandonConversation
(org.bukkit.conversations.Conversation conversation, org.bukkit.conversations.ConversationAbandonedEvent details) void
acceptConversationInput
(String input) void
addBossBar
(org.bukkit.boss.BossBar bar) Add a boss bar.void
addChannel
(String channel) Add a listening channel to this player.void
addExhaustion
(float exhaustion) Increases the exhaustion counter, but applies the maximum.void
addMoveExhaustion
(org.bukkit.Location move) Add the exhaustion for sprinting from the given location to the current location, if this player is sprinting.int
applyMending
(int amount) boolean
beginConversation
(org.bukkit.conversations.Conversation conversation) @Nullable org.bukkit.entity.Firework
boostElytra
(@NotNull org.bukkit.inventory.ItemStack itemStack) boolean
canSee
(org.bukkit.entity.Player player) boolean
canSeeChunk
(GlowChunk.Key chunk) Checks whether the player can see the given chunk.boolean
canSeeEntity
(GlowEntity entity) Checks whether the player can see the given entity.boolean
canTakeDamage
(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause) Get whether this entity should take damage from the specified source.void
void
Says a message (or runs a command).boolean
checkSignLocation
(org.bukkit.Location loc) Check that the specified location matches that of the last opened sign editor, and if so, clears the last opened sign editor.void
List<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.void
damage
(double amount) void
damage
(double amount, org.bukkit.entity.Entity cause) void
damage
(double amount, org.bukkit.entity.Entity source, @NotNull org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) void
damage
(double amount, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) void
decrementStatistic
(org.bukkit.Statistic statistic) void
decrementStatistic
(org.bukkit.Statistic statistic, int amount) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) void
decrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) boolean
discoverRecipe
(@NotNull org.bukkit.NamespacedKey recipe) int
discoverRecipes
(@NotNull Collection<org.bukkit.NamespacedKey> recipes) @NotNull net.kyori.adventure.text.Component
void
displayName
(@Nullable net.kyori.adventure.text.Component component) drop
(org.bukkit.inventory.ItemStack stack) Spawns a newGlowItem
in the world, as if this HumanEntity had dropped it.boolean
dropItem
(boolean b) void
enchanted
(int clicked) Updates level after enchanting.void
Finishes the teleport process.void
This player enters the specified bed and is marked as sleeping.org.bukkit.inventory.ItemStack
org.bukkit.advancement.AdvancementProgress
getAdvancementProgress
(org.bukkit.advancement.Advancement advancement) boolean
boolean
float
@NotNull org.bukkit.Location
org.bukkit.Location
Collection<org.bukkit.boss.BossBar>
Returns a collection of the boss bars this player sees.@NotNull org.bukkit.util.BoundingBox
@Nullable String
<T> T
getClientOption
(@NotNull com.destroystokyo.paper.ClientOption<T> clientOption) int
org.bukkit.Location
The player's compass target.int
getCooldown
(org.bukkit.Material material) float
float
getCooledAttackStrength
(float adjustTicks) Returns the current fishing hook.The one block the player is currently digging.@NotNull Set<org.bukkit.NamespacedKey>
int
The player's ender pearl cooldown game tick counter.@NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
float
The player's current exhaustion level.float
getExp()
The progress made to the next level, from 0 to 1.int
double
double
getEyeHeight
(boolean ignoreSneaking) long
The time the player first played, or 0 if unknown.float
The player's base flight speed.int
The human entity's current food level.int
double
The scale at which to display the player's health.float
The entity's hurt direction (angle).int
long
The time the player joined, in milliseconds, to be saved as last played time.long
long
The time the player last played, or 0 if unknown.long
int
getLevel()
The current level (or skill point amount) of the player.org.bukkit.inventory.MainHand
int
Gets the currently open window ID.int
getPing()
org.bukkit.entity.Player
com.destroystokyo.paper.profile.PlayerProfile
long
long
org.bukkit.WeatherType
@Nullable org.bukkit.Location
int
org.bukkit.event.player.PlayerResourcePackStatusEvent.Status
int
float
The player's current saturation level.org.bukkit.scoreboard.Scoreboard
The network session attached to this player.org.bukkit.entity.Entity
int
int
int
getStatistic
(org.bukkit.Statistic statistic) int
getStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) int
getStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) com.destroystokyo.paper.Title
getTitle()
int
Cumulative amount of experience points the player has collected.@NotNull Set<org.bukkit.entity.Player>
org.bukkit.entity.EntityType
getType()
Collection<org.bukkit.inventory.Recipe>
Recipes this player has unlocked.int
org.bukkit.inventory.ItemStack
The one itemstack the player is currently usage and associated time.int
Get a UserListItemMessage entry representing adding this player.int
float
The player's base walking speed.void
giveExp
(int xp) void
giveExp
(int xp, boolean applyMending) void
giveExpLevels
(int amount) boolean
hasCooldown
(org.bukkit.Material material) protected boolean
If true,GlowEntity.setRawLocation(Location, boolean)
withfall
true will callGlowEntity.setOnGround(boolean)
according to whether or not our location is inside a solid block.boolean
hasDiscoveredRecipe
(@NotNull org.bukkit.NamespacedKey namespacedKey) boolean
boolean
boolean
void
hidePlayer
(org.bukkit.entity.Player player) void
hidePlayer
(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player) void
void
incrementStatistic
(org.bukkit.Statistic statistic) void
incrementStatistic
(org.bukkit.Statistic statistic, int amount) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material) void
incrementStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) boolean
isBanned()
boolean
Whether to use the bed spawn even if there is no bed block.boolean
boolean
boolean
isFlying()
Whether the player is currently flying.boolean
boolean
Whether to perform special scaling of the player's health.boolean
Returns true if the player is inside a water block.boolean
isOnline()
boolean
isOp()
Whether this human is considered an op.boolean
Whether the time offset is relative.boolean
If this player has seen the end credits.boolean
boolean
boolean
boolean
void
join
(GlowSession session, PlayerDataService.PlayerReader reader) Loads the player's state and sends the messages that are necessary on login.protected void
jump()
void
kick
(@Nullable net.kyori.adventure.text.Component component) void
kickPlayer
(String message) void
kickPlayer
(String message, boolean async) boolean
knowsRecipe
(org.bukkit.inventory.Recipe recipe) Checks to see if the player knows this recipe.boolean
learnRecipe
(org.bukkit.inventory.Recipe recipe, boolean notify) Teach the player a new recipe.void
leaveBed
(boolean setSpawn) This player leaves their bed causing them to quit sleeping.void
loadData()
@NotNull Locale
locale()
@Nullable org.bukkit.inventory.InventoryView
openAnvil
(@Nullable org.bukkit.Location location, boolean b) void
openBook
(@NotNull org.bukkit.inventory.ItemStack itemStack) @Nullable org.bukkit.inventory.InventoryView
openCartographyTable
(@Nullable org.bukkit.Location location, boolean b) @Nullable org.bukkit.inventory.InventoryView
openGrindstone
(@Nullable org.bukkit.Location location, boolean b) void
openInventory
(org.bukkit.inventory.InventoryView view) @Nullable org.bukkit.inventory.InventoryView
openLoom
(@Nullable org.bukkit.Location location, boolean b) org.bukkit.inventory.InventoryView
openMerchant
(org.bukkit.entity.Villager villager, boolean b) org.bukkit.inventory.InventoryView
openMerchant
(org.bukkit.inventory.Merchant merchant, boolean b) void
openSignEditor
(org.bukkit.Location loc) Open the sign editor interface at the specified location.@Nullable org.bukkit.inventory.InventoryView
openSmithingTable
(@Nullable org.bukkit.Location location, boolean b) @Nullable org.bukkit.inventory.InventoryView
openStonecutter
(@Nullable org.bukkit.Location location, boolean b) boolean
performCommand
(String command) void
playAnimationToSelf
(org.bukkit.EntityAnimation animation) void
playEffect
(org.bukkit.Location loc, org.bukkit.Effect effect, int data) <T> void
playEffect
(org.bukkit.Location loc, org.bukkit.Effect effect, T data) @Nullable net.kyori.adventure.text.Component
@Nullable net.kyori.adventure.text.Component
@Nullable net.kyori.adventure.text.Component
void
playerListName
(@Nullable net.kyori.adventure.text.Component component) void
playNote
(org.bukkit.Location loc, byte instrument, byte note) void
playNote
(org.bukkit.Location loc, org.bukkit.Instrument instrument, org.bukkit.Note note) void
void
playSound
(org.bukkit.Location location, String sound, org.bukkit.SoundCategory category, float volume, float pitch) void
playSound
(org.bukkit.Location location, org.bukkit.Sound sound, float volume, float pitch) void
playSound
(org.bukkit.Location location, org.bukkit.Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) void
pulse()
Called every game cycle.protected void
void
remove()
Kicks this player.void
remove
(boolean async) Handle player disconnection.void
removeBossBar
(org.bukkit.boss.BossBar bar) Remove a boss bar.void
removeChannel
(String channel) Remove a listening channel from this player.void
void
void
void
void
respawn()
Respawn the player after they have died.void
saveData()
void
saveData
(boolean async) Saves the players current location, health, inventory, motion, and other information into the username.dat file, in the world/player folder.void
sendActionBar
(char alternateChar, String message) void
sendActionBar
(@NotNull String message) void
sendActionBar
(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) void
sendBlockChange
(@NotNull org.bukkit.Location loc, @NotNull org.bukkit.block.data.BlockData blockData) void
sendBlockChange
(@NotNull org.bukkit.Location loc, org.bukkit.Material type, byte data) void
sendBlockChange
(BlockChangeMessage message) Sends the givenBlockChangeMessage
if it's in a chunk this player can see.void
sendBlockChangeForce
(BlockChangeMessage message) Deprecated.void
sendBlockDamage
(@NotNull org.bukkit.Location location, float v) void
sendBlockEntityChange
(org.bukkit.Location location, GlowBlockEntity type, CompoundTag nbt) Send a block entity change to the given location.boolean
sendChunkChange
(org.bukkit.Location loc, int sx, int sy, int sz, byte[] data) void
sendExperienceChange
(float v) void
sendExperienceChange
(float v, int i) void
sendItemChange
(int slot, org.bukkit.inventory.ItemStack item) Sends aSetWindowSlotMessage
to update the contents of an inventory slot.void
sendMap
(org.bukkit.map.MapView map) void
sendMessage
(@NotNull String message) void
sendMessage
(@NotNull net.md_5.bungee.api.chat.BaseComponent component) void
sendMessage
(String[] messages) void
sendMessage
(UUID sender, @NotNull String message) void
sendMessage
(UUID sender, @NotNull String[] messages) void
sendMessage
(net.md_5.bungee.api.chat.BaseComponent... components) void
sendMessage
(net.md_5.bungee.api.ChatMessageType type, net.md_5.bungee.api.chat.BaseComponent... components) void
sendMessages
(UUID sender, String... messages) void
sendOpLevel
(byte b) void
sendPluginMessage
(org.bukkit.plugin.Plugin source, String channel, byte[] message) void
void
sendRawMessage
(@NotNull String message) void
sendRawMessage
(UUID sender, @NotNull String message) void
sendRawMessages
(String senderName, String... messages) void
sendRawMessages
(net.md_5.bungee.api.ChatMessageType type, String... messages) void
sendSignChange
(@NotNull org.bukkit.Location location, @Nullable String[] strings, @NotNull org.bukkit.DyeColor dyeColor) void
sendSignChange
(@NotNull org.bukkit.Location location, @Nullable List<net.kyori.adventure.text.Component> list) void
sendSignChange
(@NotNull org.bukkit.Location location, @Nullable List<net.kyori.adventure.text.Component> list, @NotNull org.bukkit.DyeColor dyeColor) void
sendSignChange
(SignEntity sign, org.bukkit.Location location, TextMessage[] lines) Send a sign change, similar tosendSignChange(Location, String[])
, but using complete TextMessages instead of strings.void
sendSignChange
(org.bukkit.Location location, String[] lines) void
void
void
sendTime()
Sends aTimeMessage
with the time of day.void
Send the player their current title.void
sendTitle
(com.destroystokyo.paper.Title title) void
sendTitle
(com.destroystokyo.paper.Title.Builder title) Send the player a title base on aTitle.Builder
.void
void
void
Sends aStateChangeMessage
with the current weather.void
setAffectsSpawning
(boolean affectsSpawning) void
setAllowFlight
(boolean flight) void
setBedSpawnLocation
(org.bukkit.Location bedSpawn) void
setBedSpawnLocation
(org.bukkit.Location location, boolean force) void
setCompassTarget
(org.bukkit.Location loc) void
setCooldown
(org.bukkit.Material material, int ticks) void
setCurrentFishingHook
(GlowFishingHook fishingHook) Removes the current fishing hook, if any, and sets a new one.void
setDigging
(GlowBlock block) Starts breaking a block.void
setDisplayName
(String name) void
setEnderPearlCooldown
(int enderPearlCooldown) The player's ender pearl cooldown game tick counter.void
setExhaustion
(float exhaustion) The player's current exhaustion level.void
setExp
(float percentToLevel) void
setFlying
(boolean value) void
setFlySpeed
(float value) void
setFoodLevel
(int food) void
setFoodLevelAndSaturation
(int food, float saturation) Updates the hunger bar and hunger saturation.void
setGameMode
(org.bukkit.GameMode mode) The player's active game mode.void
setHealth
(double health) void
setHealthScale
(double scale) void
setHealthScaled
(boolean scale) void
setHurtDirection
(float hurtDirection) The entity's hurt direction (angle).void
setItemOnCursor
(org.bukkit.inventory.ItemStack item) The item the player has on their cursor.void
setLevel
(int level) void
setMaxHealth
(double health) void
setOnGround
(boolean onGround) Sets the on-ground flag and clears fall distance.void
setOp
(boolean value) Whether this entity has operator permissions.void
setPlayerListFooter
(String playerListFooter) void
setPlayerListHeader
(String playerListHeader) void
setPlayerListHeaderFooter
(String header, String footer) void
setPlayerListHeaderFooter
(net.md_5.bungee.api.chat.BaseComponent[] header, net.md_5.bungee.api.chat.BaseComponent[] footer) void
setPlayerListHeaderFooter
(net.md_5.bungee.api.chat.BaseComponent header, net.md_5.bungee.api.chat.BaseComponent footer) void
setPlayerListName
(String name) void
setPlayerProfile
(com.destroystokyo.paper.profile.PlayerProfile playerProfile) void
setPlayerTime
(long time, boolean relative) void
setPlayerWeather
(org.bukkit.WeatherType type) void
setResourcePack
(String url) void
setResourcePack
(String url, byte[] hash) void
setResourcePack
(String url, String hash) void
setResourcePackStatus
(org.bukkit.event.player.PlayerResourcePackStatusEvent.Status status) void
setRotation
(float yaw, float pitch) void
setSaturatedRegenRate
(int i) void
setSaturation
(float value) void
setScoreboard
(org.bukkit.scoreboard.Scoreboard scoreboard) void
setSeenCredits
(boolean seenCredits) If this player has seen the end credits.void
setSettings
(ClientSettings settings) Set this player's client settings.void
setSleepingIgnored
(boolean isSleeping) void
setSneaking
(boolean sneak) void
setSpectatorTarget
(org.bukkit.entity.Entity entity) void
setSprinting
(boolean sprinting) void
setStarvationRate
(int i) void
setStatistic
(org.bukkit.Statistic statistic, int newValue) void
setStatistic
(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) void
setStatistic
(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) void
setSubtitle
(net.md_5.bungee.api.chat.BaseComponent subtitle) void
setSubtitle
(net.md_5.bungee.api.chat.BaseComponent[] subtitle) void
setTexturePack
(String url) Deprecated.void
setTitleTimes
(int fadeInTicks, int stayTicks, int fadeOutTicks) void
setTotalExperience
(int exp) void
setUnsaturatedRegenRate
(int i) void
setUsageItem
(org.bukkit.inventory.ItemStack usageItem) The one itemstack the player is currently usage and associated time.void
setUsageTime
(int usageTime) void
setVelocity
(org.bukkit.util.Vector velocity) void
setViewDistance
(int viewDistance) void
setWalkSpeed
(float value) void
setWhitelisted
(boolean value) boolean
setWindowProperty
(org.bukkit.inventory.InventoryView.Property prop, int value) boolean
Checks whether this entity should be saved as part of the world.void
showParticle
(org.bukkit.Location loc, org.bukkit.Effect particle, org.bukkit.material.MaterialData material, float offsetX, float offsetY, float offsetZ, float speed, int amount) Sends aPlayParticleMessage
to display the given particle.void
showPlayer
(org.bukkit.entity.Player player) void
showPlayer
(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player) void
showTitle
(net.md_5.bungee.api.chat.BaseComponent title) void
showTitle
(net.md_5.bungee.api.chat.BaseComponent[] title) void
showTitle
(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) void
showTitle
(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) boolean
sleep
(@NotNull org.bukkit.Location location, boolean force) void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count) void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) <T> void
spawnParticle
(org.bukkit.Particle particle, double x, double y, double z, int count, T data) void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count) void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) <T> void
spawnParticle
(org.bukkit.Particle particle, org.bukkit.Location location, int count, T data) org.bukkit.entity.Player.Spigot
spigot()
void
stopHidingDisconnectedPlayer
(org.bukkit.entity.Player player) Called when a player hidden to this player disconnects.void
void
void
stopSound
(org.bukkit.Sound sound) void
stopSound
(org.bukkit.SoundCategory category, org.bukkit.Sound sound) void
stopSound
(org.bukkit.Sound sound, org.bukkit.SoundCategory soundCategory) boolean
teleport
(org.bukkit.Location location) Teleport the player.boolean
teleport
(org.bukkit.Location location, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) protected boolean
Teleport this entity to the End.protected boolean
Teleport this entity to the spawn point of the main world.toString()
boolean
undiscoverRecipe
(@NotNull org.bukkit.NamespacedKey recipe) int
undiscoverRecipes
(@NotNull Collection<org.bukkit.NamespacedKey> recipes) boolean
unlearnRecipe
(org.bukkit.inventory.Recipe recipe) Remove a recipe from the player's known recipes.void
void
void
updateTitle
(com.destroystokyo.paper.Title title) void
updateTitle
(TitleMessage.Action action, Object... value) Update a specific attribute of the player's title.void
wakeup
(boolean setSpawnLocation) Methods inherited from class net.glowstone.entity.GlowHumanEntity
addAttachment, addAttachment, addAttachment, addAttachment, closeInventory, closeInventory, dropItemInHand, getEffectivePermissions, getEnderChest, getEquipment, getGameMode, getInventory, getItemInHand, getItemOnCursor, getLeftShoulderTag, getName, getOpenInventory, getProfile, getRightShoulderTag, getShoulderEntityLeft, getShoulderEntityRight, getSleepTicks, getUniqueId, getXpSeed, hasPermission, hasPermission, isBlocking, isPermissionSet, isPermissionSet, isSleeping, openEnchanting, openInventory, openSign, openWorkbench, recalculatePermissions, releaseLeftShoulderEntity, releaseRightShoulderEntity, removeAttachment, setFireTicks, setItemInHand, setLeftShoulderTag, setRightShoulderTag, setShoulderEntityLeft, setShoulderEntityRight, setUniqueId, setXpSeed
Methods inherited from class net.glowstone.entity.GlowLivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, clearActivePotionEffects, createUpdateMessage, entityInteract, getAbsorptionAmount, getActivePotionEffects, getAmbientDelay, getAmbientSound, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getAttributeManager, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDeathTicks, getEquipmentMonitor, getEyeLocation, getHeadYaw, getHealth, getHurtSound, getKiller, getLastDamage, getLastDamager, getLastTwoTargetBlocks, getLineOfSight, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getMovement, getNoDamageTicks, getPlayerDamageTick, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSoundPitch, getSoundVolume, getSpeed, getState, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, getTaskManager, getVelocityFromMovement, hasAI, hasLineOfSight, hasPotionEffect, isArthropod, isCollidable, isFallFlying, isGliding, isInvisible, isJumping, isRiptiding, isSwimming, isUndead, isWithinSolidBlock, launchProjectile, launchProjectile, launchProjectile, launchProjectile, playAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, registerAttribute, removePotionEffect, reset, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setCanPickupItems, setCollidable, setFallFlying, setGliding, setHeadYaw, setInvisible, setJumping, setKiller, setLastDamage, setLastDamager, setMaximumAir, setMaximumNoDamageTicks, setMemory, setMovement, setNoDamageTicks, setPlayerDamageTick, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSpeed, setState, setSwimming, swingMainHand, swingOffHand, tryUseTotem, updatePotionEffectsMetadata
Methods inherited from class net.glowstone.entity.GlowEntity
addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, customName, customName, eject, equals, fromMobSpawner, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEntityId, getFacing, getFallDistance, getFireTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getVehicle, getVelocity, getWidth, getWorld, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInvulnerable, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, removeMetadata, removePassenger, removeScoreboardTag, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setSilent, setSize, setTicksLived, teleport, teleport, updateBoundingBox
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.attribute.Attributable
getAttribute, registerAttribute
Methods inherited from interface net.kyori.adventure.audience.Audience
hideBossBar, openBook, openBook, playSound, playSound, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
sendMessage
Methods inherited from interface org.bukkit.entity.Damageable
getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, eject, fromMobSpawner, getChunk, getEntityId, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setSilent, setTicksLived, teleport, teleport, teleportAsync, teleportAsync
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.HumanEntity
closeInventory, closeInventory, getEnderChest, getGameMode, getInventory, getItemInHand, getItemOnCursor, getName, getOpenInventory, getShoulderEntityLeft, getShoulderEntityRight, getSleepTicks, isBlocking, openEnchanting, openInventory, openSign, openWorkbench, releaseLeftShoulderEntity, releaseRightShoulderEntity, setItemInHand, setShoulderEntityLeft, setShoulderEntityRight
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getCanPickupItems, getCategory, getCollidableExemptions, getEquipment, getEyeLocation, getKiller, getLastDamage, getLastTwoTargetBlocks, getLeashHolder, getLineOfSight, getMaximumAir, getMaximumNoDamageTicks, getMemory, getNoDamageTicks, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getTargetBlock, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockFace, getTargetBlockInfo, getTargetBlockInfo, getTargetEntity, getTargetEntity, getTargetEntityInfo, getTargetEntityInfo, hasAI, hasLineOfSight, hasPotionEffect, isCollidable, isGliding, isInvisible, isJumping, isLeashed, isRiptiding, isSleeping, isSwimming, playAnimation, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setCanPickupItems, setCollidable, setGliding, setInvisible, setJumping, setKiller, setLastDamage, setLeashHolder, setMaximumAir, setMaximumNoDamageTicks, setMemory, setNoDamageTicks, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSwimming, swingMainHand, swingOffHand
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.OfflinePlayer
banPlayer, banPlayer, banPlayer, banPlayer, banPlayer, getName, getUniqueId
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.entity.Player
asHoverEvent, banPlayerFull, banPlayerFull, banPlayerFull, banPlayerFull, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, banPlayerIP, identity, isOnGround
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
-
Field Details
-
HOOK_MAX_DISTANCE
public static final int HOOK_MAX_DISTANCEMax distance of a fishing hook.- See Also:
-
teleportedTo
public org.bukkit.Location teleportedTo -
affectsSpawning
public boolean affectsSpawning
-
-
Constructor Details
-
GlowPlayer
public GlowPlayer(GlowSession session, GlowPlayerProfile profile, PlayerDataService.PlayerReader reader) Creates a new player and adds it to the world.- Parameters:
session
- The player's session.profile
- The player's profile with name and UUID information.reader
- The PlayerReader to be used to initialize the player.
-
-
Method Details
-
hasJoined
public boolean hasJoined() -
getCurrentFishingHook
Returns the current fishing hook.- Returns:
- the current fishing hook, or null if not fishing
-
setCurrentFishingHook
Removes the current fishing hook, if any, and sets a new one.- Parameters:
fishingHook
- the new fishing hook, or null to stop fishing
-
join
Loads the player's state and sends the messages that are necessary on login.- Parameters:
session
- the player's sessionreader
- the source of the player's saved state
-
toString
- Overrides:
toString
in classGlowEntity
-
damage
public void damage(double amount) - Specified by:
damage
in interfaceorg.bukkit.entity.Damageable
- Overrides:
damage
in classGlowEntity
-
damage
public void damage(double amount, org.bukkit.entity.Entity cause) - Specified by:
damage
in interfaceorg.bukkit.entity.Damageable
- Overrides:
damage
in classGlowEntity
-
damage
public void damage(double amount, org.bukkit.entity.Entity source, @NotNull @NotNull org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) - Specified by:
damage
in interfaceorg.bukkit.entity.Damageable
- Overrides:
damage
in classGlowLivingEntity
-
damage
public void damage(double amount, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) - Specified by:
damage
in interfaceorg.bukkit.entity.Damageable
- Overrides:
damage
in classGlowEntity
-
canTakeDamage
public boolean canTakeDamage(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause) Description copied from class:GlowLivingEntity
Get whether this entity should take damage from the specified source.Usually used to check environmental sources such as drowning.
- Overrides:
canTakeDamage
in classGlowHumanEntity
- Parameters:
damageCause
- the damage source to check- Returns:
- whether this entity can take damage from the source
-
remove
public void remove()Kicks this player.- Specified by:
remove
in interfaceorg.bukkit.entity.Entity
- Overrides:
remove
in classGlowEntity
-
remove
public void remove(boolean async) Handle player disconnection.- Parameters:
async
- if true, the player's data is saved asynchronously
-
shouldSave
public boolean shouldSave()Description copied from class:GlowEntity
Checks whether this entity should be saved as part of the world.- Overrides:
shouldSave
in classGlowEntity
- Returns:
- True if the entity should be saved.
-
pulse
public void pulse()Description copied from class:GlowEntity
Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.- Overrides:
pulse
in classGlowHumanEntity
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysics
in classGlowLivingEntity
-
jump
protected void jump()- Overrides:
jump
in classGlowLivingEntity
-
respawn
public void respawn()Respawn the player after they have died. -
canSeeChunk
Checks whether the player can see the given chunk.- Parameters:
chunk
- The chunk to check.- Returns:
- If the chunk is known to the player's client.
-
canSeeEntity
Checks whether the player can see the given entity.- Parameters:
entity
- The entity to check.- Returns:
- If the entity is known to the player's client.
-
openSignEditor
public void openSignEditor(org.bukkit.Location loc) Open the sign editor interface at the specified location.- Parameters:
loc
- The location to open the editor at
-
checkSignLocation
public boolean checkSignLocation(org.bukkit.Location loc) Check that the specified location matches that of the last opened sign editor, and if so, clears the last opened sign editor.- Parameters:
loc
- The location to check- Returns:
- Whether the location matched.
-
getUserListEntry
Get a UserListItemMessage entry representing adding this player.- Returns:
- The entry (action ADD_PLAYER) with this player's information.
-
setVelocity
public void setVelocity(org.bukkit.util.Vector velocity) - Specified by:
setVelocity
in interfaceorg.bukkit.entity.Entity
- Overrides:
setVelocity
in classGlowEntity
-
getBoundingBox
@NotNull public @NotNull org.bukkit.util.BoundingBox getBoundingBox()- Specified by:
getBoundingBox
in interfaceorg.bukkit.entity.Entity
- Overrides:
getBoundingBox
in classGlowEntity
-
setRotation
public void setRotation(float yaw, float pitch) - Specified by:
setRotation
in interfaceorg.bukkit.entity.Entity
- Overrides:
setRotation
in classGlowEntity
-
setSettings
Set this player's client settings.- Parameters:
settings
- The settings to set.
-
serialize
- Specified by:
serialize
in interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
getType
public org.bukkit.entity.EntityType getType()- Specified by:
getType
in interfaceorg.bukkit.entity.Entity
- Overrides:
getType
in classGlowEntity
-
getAddress
- Specified by:
getAddress
in interfacecom.destroystokyo.paper.network.NetworkClient
- Specified by:
getAddress
in interfaceorg.bukkit.entity.Player
-
getProtocolVersion
public int getProtocolVersion()- Specified by:
getProtocolVersion
in interfacecom.destroystokyo.paper.network.NetworkClient
-
getVirtualHost
- Specified by:
getVirtualHost
in interfacecom.destroystokyo.paper.network.NetworkClient
-
isOnline
public boolean isOnline()- Specified by:
isOnline
in interfaceorg.bukkit.OfflinePlayer
-
isBanned
public boolean isBanned()- Specified by:
isBanned
in interfaceorg.bukkit.OfflinePlayer
-
isWhitelisted
public boolean isWhitelisted()- Specified by:
isWhitelisted
in interfaceorg.bukkit.OfflinePlayer
-
setWhitelisted
public void setWhitelisted(boolean value) - Specified by:
setWhitelisted
in interfaceorg.bukkit.OfflinePlayer
-
hasDefaultLandingBehavior
protected boolean hasDefaultLandingBehavior()Description copied from class:GlowEntity
If true,GlowEntity.setRawLocation(Location, boolean)
withfall
true will callGlowEntity.setOnGround(boolean)
according to whether or not our location is inside a solid block.- Overrides:
hasDefaultLandingBehavior
in classGlowEntity
- Returns:
- true to call
GlowEntity.setOnGround(boolean)
fromGlowEntity.setRawLocation(Location, boolean)
; false otherwise
-
getPlayer
public org.bukkit.entity.Player getPlayer()- Specified by:
getPlayer
in interfaceorg.bukkit.OfflinePlayer
-
hasPlayedBefore
public boolean hasPlayedBefore()- Specified by:
hasPlayedBefore
in interfaceorg.bukkit.OfflinePlayer
-
isOp
public boolean isOp()Description copied from class:GlowHumanEntity
Whether this human is considered an op.- Specified by:
isOp
in interfaceorg.bukkit.permissions.ServerOperator
- Overrides:
isOp
in classGlowHumanEntity
-
setOp
public void setOp(boolean value) Description copied from class:GlowEntity
Whether this entity has operator permissions.- Specified by:
setOp
in interfaceorg.bukkit.permissions.ServerOperator
- Overrides:
setOp
in classGlowHumanEntity
-
createSpawnMessage
Description copied from class:GlowEntity
Creates a list ofMessage
s which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Overrides:
createSpawnMessage
in classGlowHumanEntity
- Returns:
- A list of messages which can spawn this entity.
-
displayName
@NotNull public @NotNull net.kyori.adventure.text.Component displayName()- Specified by:
displayName
in interfaceorg.bukkit.entity.Player
-
displayName
public void displayName(@Nullable @Nullable net.kyori.adventure.text.Component component) - Specified by:
displayName
in interfaceorg.bukkit.entity.Player
-
getDisplayName
- Specified by:
getDisplayName
in interfaceorg.bukkit.entity.Player
-
setDisplayName
- Specified by:
setDisplayName
in interfaceorg.bukkit.entity.Player
-
playerListName
public void playerListName(@Nullable @Nullable net.kyori.adventure.text.Component component) - Specified by:
playerListName
in interfaceorg.bukkit.entity.Player
-
playerListName
@Nullable public @Nullable net.kyori.adventure.text.Component playerListName()- Specified by:
playerListName
in interfaceorg.bukkit.entity.Player
-
playerListHeader
@Nullable public @Nullable net.kyori.adventure.text.Component playerListHeader()- Specified by:
playerListHeader
in interfaceorg.bukkit.entity.Player
-
getPlayerListName
- Specified by:
getPlayerListName
in interfaceorg.bukkit.entity.Player
-
setPlayerListName
- Specified by:
setPlayerListName
in interfaceorg.bukkit.entity.Player
-
setCompassTarget
public void setCompassTarget(org.bukkit.Location loc) - Specified by:
setCompassTarget
in interfaceorg.bukkit.entity.Player
-
getBedSpawnLocation
public org.bukkit.Location getBedSpawnLocation()- Specified by:
getBedSpawnLocation
in interfaceorg.bukkit.OfflinePlayer
- Specified by:
getBedSpawnLocation
in interfaceorg.bukkit.entity.Player
-
setBedSpawnLocation
public void setBedSpawnLocation(org.bukkit.Location bedSpawn) - Specified by:
setBedSpawnLocation
in interfaceorg.bukkit.entity.Player
-
setBedSpawnLocation
public void setBedSpawnLocation(org.bukkit.Location location, boolean force) - Specified by:
setBedSpawnLocation
in interfaceorg.bukkit.entity.Player
-
getLastLogin
public long getLastLogin()- Specified by:
getLastLogin
in interfaceorg.bukkit.OfflinePlayer
-
getLastSeen
public long getLastSeen()- Specified by:
getLastSeen
in interfaceorg.bukkit.OfflinePlayer
-
sleep
public boolean sleep(@NotNull @NotNull org.bukkit.Location location, boolean force) - Specified by:
sleep
in interfaceorg.bukkit.entity.HumanEntity
-
wakeup
public void wakeup(boolean setSpawnLocation) - Specified by:
wakeup
in interfaceorg.bukkit.entity.HumanEntity
-
getBedLocation
@NotNull public @NotNull org.bukkit.Location getBedLocation()- Specified by:
getBedLocation
in interfaceorg.bukkit.entity.HumanEntity
-
isSleepingIgnored
public boolean isSleepingIgnored()- Specified by:
isSleepingIgnored
in interfaceorg.bukkit.entity.Player
-
setSleepingIgnored
public void setSleepingIgnored(boolean isSleeping) - Specified by:
setSleepingIgnored
in interfaceorg.bukkit.entity.Player
-
setGameMode
public void setGameMode(org.bukkit.GameMode mode) Description copied from class:GlowHumanEntity
The player's active game mode.- Specified by:
setGameMode
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
setGameMode
in classGlowHumanEntity
-
getActiveItem
public org.bukkit.inventory.ItemStack getActiveItem()- Specified by:
getActiveItem
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getActiveItem
in classGlowLivingEntity
-
setUsageTime
public void setUsageTime(int usageTime) -
getItemUseRemainingTime
public int getItemUseRemainingTime()- Specified by:
getItemUseRemainingTime
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getItemUseRemainingTime
in classGlowLivingEntity
-
getHandRaisedTime
public int getHandRaisedTime()- Specified by:
getHandRaisedTime
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getHandRaisedTime
in classGlowLivingEntity
-
isHandRaised
public boolean isHandRaised()- Specified by:
isHandRaised
in interfaceorg.bukkit.entity.HumanEntity
- Specified by:
isHandRaised
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
isHandRaised
in classGlowLivingEntity
-
isSneaking
public boolean isSneaking()- Specified by:
isSneaking
in interfaceorg.bukkit.entity.Player
-
setSneaking
public void setSneaking(boolean sneak) - Specified by:
setSneaking
in interfaceorg.bukkit.entity.Player
-
isSprinting
public boolean isSprinting()- Specified by:
isSprinting
in interfaceorg.bukkit.entity.Player
-
setSprinting
public void setSprinting(boolean sprinting) - Specified by:
setSprinting
in interfaceorg.bukkit.entity.Player
-
getEyeHeight
public double getEyeHeight()- Specified by:
getEyeHeight
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getEyeHeight
in classGlowLivingEntity
-
getEyeHeight
public double getEyeHeight(boolean ignoreSneaking) - Specified by:
getEyeHeight
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getEyeHeight
in classGlowLivingEntity
-
getAllowFlight
public boolean getAllowFlight()- Specified by:
getAllowFlight
in interfaceorg.bukkit.entity.Player
-
setAllowFlight
public void setAllowFlight(boolean flight) - Specified by:
setAllowFlight
in interfaceorg.bukkit.entity.Player
-
setFlying
public void setFlying(boolean value) - Specified by:
setFlying
in interfaceorg.bukkit.entity.Player
-
setFlySpeed
- Specified by:
setFlySpeed
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
setWalkSpeed
- Specified by:
setWalkSpeed
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
setLevel
public void setLevel(int level) - Specified by:
setLevel
in interfaceorg.bukkit.entity.Player
-
setTotalExperience
public void setTotalExperience(int exp) - Specified by:
setTotalExperience
in interfaceorg.bukkit.entity.Player
-
sendExperienceChange
public void sendExperienceChange(float v) - Specified by:
sendExperienceChange
in interfaceorg.bukkit.entity.Player
-
sendExperienceChange
public void sendExperienceChange(float v, int i) - Specified by:
sendExperienceChange
in interfaceorg.bukkit.entity.Player
-
giveExp
public void giveExp(int xp) - Specified by:
giveExp
in interfaceorg.bukkit.entity.Player
-
giveExp
public void giveExp(int xp, boolean applyMending) - Specified by:
giveExp
in interfaceorg.bukkit.entity.Player
-
applyMending
public int applyMending(int amount) - Specified by:
applyMending
in interfaceorg.bukkit.entity.Player
-
giveExpLevels
public void giveExpLevels(int amount) - Specified by:
giveExpLevels
in interfaceorg.bukkit.entity.Player
-
setExp
public void setExp(float percentToLevel) - Specified by:
setExp
in interfaceorg.bukkit.entity.Player
-
getExpToLevel
public int getExpToLevel()- Specified by:
getExpToLevel
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
getExpToLevel
in classGlowHumanEntity
-
getAttackCooldown
public float getAttackCooldown()- Specified by:
getAttackCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
discoverRecipe
public boolean discoverRecipe(@NotNull @NotNull org.bukkit.NamespacedKey recipe) - Specified by:
discoverRecipe
in interfaceorg.bukkit.entity.HumanEntity
-
discoverRecipes
- Specified by:
discoverRecipes
in interfaceorg.bukkit.entity.HumanEntity
-
undiscoverRecipe
public boolean undiscoverRecipe(@NotNull @NotNull org.bukkit.NamespacedKey recipe) - Specified by:
undiscoverRecipe
in interfaceorg.bukkit.entity.HumanEntity
-
undiscoverRecipes
- Specified by:
undiscoverRecipes
in interfaceorg.bukkit.entity.HumanEntity
-
hasDiscoveredRecipe
public boolean hasDiscoveredRecipe(@NotNull @NotNull org.bukkit.NamespacedKey namespacedKey) - Specified by:
hasDiscoveredRecipe
in interfaceorg.bukkit.entity.HumanEntity
-
getDiscoveredRecipes
- Specified by:
getDiscoveredRecipes
in interfaceorg.bukkit.entity.HumanEntity
-
dropItem
public boolean dropItem(boolean b) - Specified by:
dropItem
in interfaceorg.bukkit.entity.HumanEntity
-
getUnlockedRecipes
Recipes this player has unlocked.- Returns:
- An immutable list of unlocked recipes.
-
learnRecipe
public boolean learnRecipe(org.bukkit.inventory.Recipe recipe, boolean notify) Teach the player a new recipe.- Parameters:
recipe
- The recipe to be added to learnt recipesnotify
- If the player should be notified of the recipes learnt- Returns:
- If this recipe was not learned already.
-
unlearnRecipe
public boolean unlearnRecipe(org.bukkit.inventory.Recipe recipe) Remove a recipe from the player's known recipes.- Parameters:
recipe
- The recipe to be removed from learnt recipes- Returns:
- If this recipe was learned before it was removed.
-
knowsRecipe
public boolean knowsRecipe(org.bukkit.inventory.Recipe recipe) Checks to see if the player knows this recipe.- Parameters:
recipe
- The recipe to check- Returns:
- If the player knows the recipe
-
setHealth
public void setHealth(double health) - Specified by:
setHealth
in interfaceorg.bukkit.entity.Damageable
- Overrides:
setHealth
in classGlowLivingEntity
-
setMaxHealth
public void setMaxHealth(double health) - Specified by:
setMaxHealth
in interfaceorg.bukkit.entity.Damageable
- Overrides:
setMaxHealth
in classGlowLivingEntity
-
setHealthScaled
public void setHealthScaled(boolean scale) - Specified by:
setHealthScaled
in interfaceorg.bukkit.entity.Player
-
setHealthScale
- Specified by:
setHealthScale
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
getSpectatorTarget
public org.bukkit.entity.Entity getSpectatorTarget()- Specified by:
getSpectatorTarget
in interfaceorg.bukkit.entity.Player
-
setSpectatorTarget
public void setSpectatorTarget(org.bukkit.entity.Entity entity) - Specified by:
setSpectatorTarget
in interfaceorg.bukkit.entity.Player
-
setFoodLevelAndSaturation
public void setFoodLevelAndSaturation(int food, float saturation) Updates the hunger bar and hunger saturation.- Parameters:
food
- the amount of food (in half-icons on the hunger bar)saturation
- the amount of food saturation (in half-icons of food it will save)
-
setFoodLevel
public void setFoodLevel(int food) - Specified by:
setFoodLevel
in interfaceorg.bukkit.entity.HumanEntity
-
getSaturatedRegenRate
public int getSaturatedRegenRate()- Specified by:
getSaturatedRegenRate
in interfaceorg.bukkit.entity.HumanEntity
-
setSaturatedRegenRate
public void setSaturatedRegenRate(int i) - Specified by:
setSaturatedRegenRate
in interfaceorg.bukkit.entity.HumanEntity
-
getUnsaturatedRegenRate
public int getUnsaturatedRegenRate()- Specified by:
getUnsaturatedRegenRate
in interfaceorg.bukkit.entity.HumanEntity
-
setUnsaturatedRegenRate
public void setUnsaturatedRegenRate(int i) - Specified by:
setUnsaturatedRegenRate
in interfaceorg.bukkit.entity.HumanEntity
-
getStarvationRate
public int getStarvationRate()- Specified by:
getStarvationRate
in interfaceorg.bukkit.entity.HumanEntity
-
setStarvationRate
public void setStarvationRate(int i) - Specified by:
setStarvationRate
in interfaceorg.bukkit.entity.HumanEntity
-
addExhaustion
public void addExhaustion(float exhaustion) Increases the exhaustion counter, but applies the maximum.- Parameters:
exhaustion
- the amount of exhaustion to add
-
addMoveExhaustion
public void addMoveExhaustion(org.bukkit.Location move) Add the exhaustion for sprinting from the given location to the current location, if this player is sprinting.- Parameters:
move
- the previous location
-
setSaturation
public void setSaturation(float value) - Specified by:
setSaturation
in interfaceorg.bukkit.entity.HumanEntity
-
teleport
public boolean teleport(org.bukkit.Location location) Teleport the player.- Specified by:
teleport
in interfaceorg.bukkit.entity.Entity
- Overrides:
teleport
in classGlowEntity
- Parameters:
location
- The destination to teleport to.- Returns:
- Whether the teleport was a success.
-
teleport
public boolean teleport(org.bukkit.Location location, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) - Specified by:
teleport
in interfaceorg.bukkit.entity.Entity
- Overrides:
teleport
in classGlowEntity
-
endTeleport
public void endTeleport()Finishes the teleport process. -
teleportToSpawn
protected boolean teleportToSpawn()Description copied from class:GlowEntity
Teleport this entity to the spawn point of the main world. This is used to teleport out of the End.- Overrides:
teleportToSpawn
in classGlowEntity
- Returns:
true
if the teleport was successful.
-
teleportToEnd
protected boolean teleportToEnd()Description copied from class:GlowEntity
Teleport this entity to the End. If no End world is loaded this does nothing.- Overrides:
teleportToEnd
in classGlowEntity
- Returns:
true
if the teleport was successful.
-
enterBed
This player enters the specified bed and is marked as sleeping.- Parameters:
block
- the bed
-
leaveBed
public void leaveBed(boolean setSpawn) This player leaves their bed causing them to quit sleeping.- Parameters:
setSpawn
- Whether to set the bed spawn of the player
-
sendMessage
- Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Overrides:
sendMessage
in classGlowEntity
-
sendMessage
- Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Overrides:
sendMessage
in classGlowEntity
-
sendMessage
public void sendMessage(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent component) - Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Specified by:
sendMessage
in interfaceorg.bukkit.entity.Player
-
sendMessage
public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) - Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Specified by:
sendMessage
in interfaceorg.bukkit.entity.Player
-
sendMessage
public void sendMessage(net.md_5.bungee.api.ChatMessageType type, net.md_5.bungee.api.chat.BaseComponent... components) - Specified by:
sendMessage
in interfaceorg.bukkit.entity.Player
-
sendMessage
- Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Overrides:
sendMessage
in classGlowEntity
-
sendMessage
- Specified by:
sendMessage
in interfaceorg.bukkit.command.CommandSender
- Overrides:
sendMessage
in classGlowEntity
-
sendMessages
-
sendRawMessages
-
sendRawMessages
-
sendRawMessage
- Specified by:
sendRawMessage
in interfaceorg.bukkit.conversations.Conversable
- Specified by:
sendRawMessage
in interfaceorg.bukkit.entity.Player
-
sendRawMessage
- Specified by:
sendRawMessage
in interfaceorg.bukkit.conversations.Conversable
-
sendActionBar
- Specified by:
sendActionBar
in interfaceorg.bukkit.entity.Player
-
sendActionBar
- Specified by:
sendActionBar
in interfaceorg.bukkit.entity.Player
-
sendActionBar
public void sendActionBar(@NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent... components) - Specified by:
sendActionBar
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, org.bukkit.Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
spawnParticle
public <T> void spawnParticle(org.bukkit.Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticle
in interfaceorg.bukkit.entity.Player
-
getAdvancementProgress
public org.bukkit.advancement.AdvancementProgress getAdvancementProgress(org.bukkit.advancement.Advancement advancement) - Specified by:
getAdvancementProgress
in interfaceorg.bukkit.entity.Player
-
getClientViewDistance
public int getClientViewDistance()- Specified by:
getClientViewDistance
in interfaceorg.bukkit.entity.Player
-
locale
- Specified by:
locale
in interfaceorg.bukkit.entity.Player
-
getPing
public int getPing()- Specified by:
getPing
in interfaceorg.bukkit.entity.Player
-
getLocale
- Specified by:
getLocale
in interfaceorg.bukkit.entity.Player
-
getAffectsSpawning
public boolean getAffectsSpawning()- Specified by:
getAffectsSpawning
in interfaceorg.bukkit.entity.Player
-
updateCommands
public void updateCommands()- Specified by:
updateCommands
in interfaceorg.bukkit.entity.Player
-
openBook
public void openBook(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) - Specified by:
openBook
in interfaceorg.bukkit.entity.Player
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistance
in interfaceorg.bukkit.entity.Player
-
setViewDistance
public void setViewDistance(int viewDistance) - Specified by:
setViewDistance
in interfaceorg.bukkit.entity.Player
-
kickPlayer
- Specified by:
kickPlayer
in interfaceorg.bukkit.entity.Player
-
kickPlayer
-
kick
public void kick(@Nullable @Nullable net.kyori.adventure.text.Component component) - Specified by:
kick
in interfaceorg.bukkit.entity.Player
-
performCommand
- Specified by:
performCommand
in interfaceorg.bukkit.entity.Player
-
chat
- Specified by:
chat
in interfaceorg.bukkit.entity.Player
-
chat
Says a message (or runs a command).- Parameters:
text
- message sent by the player.async
- whether the message was received asynchronously.
-
saveData
public void saveData()- Specified by:
saveData
in interfaceorg.bukkit.entity.Player
-
saveData
public void saveData(boolean async) Saves the players current location, health, inventory, motion, and other information into the username.dat file, in the world/player folder.- Parameters:
async
- if true, save asynchronously; if false, block until saved
-
loadData
public void loadData()- Specified by:
loadData
in interfaceorg.bukkit.entity.Player
-
setTexturePack
Deprecated.- Specified by:
setTexturePack
in interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePack
in interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePack
in interfaceorg.bukkit.entity.Player
-
setResourcePack
- Specified by:
setResourcePack
in interfaceorg.bukkit.entity.Player
-
getResourcePackStatus
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus()- Specified by:
getResourcePackStatus
in interfaceorg.bukkit.entity.Player
-
setResourcePackStatus
public void setResourcePackStatus(org.bukkit.event.player.PlayerResourcePackStatusEvent.Status status) -
getResourcePackHash
- Specified by:
getResourcePackHash
in interfaceorg.bukkit.entity.Player
-
hasResourcePack
public boolean hasResourcePack()- Specified by:
hasResourcePack
in interfaceorg.bukkit.entity.Player
-
getPlayerProfile
public com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile()- Specified by:
getPlayerProfile
in interfaceorg.bukkit.entity.Player
-
setPlayerProfile
public void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile playerProfile) - Specified by:
setPlayerProfile
in interfaceorg.bukkit.entity.Player
-
getCooldownPeriod
public float getCooldownPeriod()- Specified by:
getCooldownPeriod
in interfaceorg.bukkit.entity.Player
-
getCooledAttackStrength
public float getCooledAttackStrength(float adjustTicks) - Specified by:
getCooledAttackStrength
in interfaceorg.bukkit.entity.Player
-
resetCooldown
public void resetCooldown()- Specified by:
resetCooldown
in interfaceorg.bukkit.entity.Player
-
getClientOption
@NotNull public <T> T getClientOption(@NotNull @NotNull com.destroystokyo.paper.ClientOption<T> clientOption) - Specified by:
getClientOption
in interfaceorg.bukkit.entity.Player
-
boostElytra
@Nullable public @Nullable org.bukkit.entity.Firework boostElytra(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) - Specified by:
boostElytra
in interfaceorg.bukkit.entity.Player
-
sendOpLevel
public void sendOpLevel(byte b) - Specified by:
sendOpLevel
in interfaceorg.bukkit.entity.Player
-
getTrackedPlayers
- Specified by:
getTrackedPlayers
in interfaceorg.bukkit.entity.Player
-
getClientBrandName
- Specified by:
getClientBrandName
in interfaceorg.bukkit.entity.Player
-
playNote
public void playNote(org.bukkit.Location loc, org.bukkit.Instrument instrument, org.bukkit.Note note) - Specified by:
playNote
in interfaceorg.bukkit.entity.Player
-
playNote
public void playNote(org.bukkit.Location loc, byte instrument, byte note) - Specified by:
playNote
in interfaceorg.bukkit.entity.Player
-
playEffect
public void playEffect(org.bukkit.Location loc, org.bukkit.Effect effect, int data) - Specified by:
playEffect
in interfaceorg.bukkit.entity.Player
-
playEffect
public <T> void playEffect(org.bukkit.Location loc, org.bukkit.Effect effect, T data) - Specified by:
playEffect
in interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(org.bukkit.Location location, org.bukkit.Sound sound, float volume, float pitch) - Specified by:
playSound
in interfaceorg.bukkit.entity.Player
-
playSound
- Specified by:
playSound
in interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(org.bukkit.Location location, String sound, org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSound
in interfaceorg.bukkit.entity.Player
-
playSound
public void playSound(org.bukkit.Location location, org.bukkit.Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) - Specified by:
playSound
in interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(org.bukkit.Sound sound) - Specified by:
stopSound
in interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(org.bukkit.Sound sound, org.bukkit.SoundCategory soundCategory) - Specified by:
stopSound
in interfaceorg.bukkit.entity.Player
-
stopSound
- Specified by:
stopSound
in interfaceorg.bukkit.entity.Player
-
stopSound
public void stopSound(org.bukkit.SoundCategory category, org.bukkit.Sound sound) -
stopSound
- Specified by:
stopSound
in interfaceorg.bukkit.entity.Player
-
spigot
public org.bukkit.entity.Player.Spigot spigot()- Specified by:
spigot
in interfaceorg.bukkit.command.CommandSender
- Specified by:
spigot
in interfaceorg.bukkit.entity.Entity
- Specified by:
spigot
in interfaceorg.bukkit.entity.Player
- Overrides:
spigot
in classGlowEntity
-
getEntitySpawnReason
public @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason()- Specified by:
getEntitySpawnReason
in interfaceorg.bukkit.entity.Entity
- Overrides:
getEntitySpawnReason
in classGlowEntity
-
showParticle
public void showParticle(org.bukkit.Location loc, org.bukkit.Effect particle, org.bukkit.material.MaterialData material, float offsetX, float offsetY, float offsetZ, float speed, int amount) Sends aPlayParticleMessage
to display the given particle.- Parameters:
loc
- the locationparticle
- the particle typematerial
- the item or block dataoffsetX
- TODO: document this parameteroffsetY
- TODO: document this parameteroffsetZ
- TODO: document this parameterspeed
- TODO: document this parameteramount
- the number of particles
-
sendBlockChange
public void sendBlockChange(@NotNull @NotNull org.bukkit.Location loc, org.bukkit.Material type, byte data) - Specified by:
sendBlockChange
in interfaceorg.bukkit.entity.Player
-
sendBlockChange
public void sendBlockChange(@NotNull @NotNull org.bukkit.Location loc, @NotNull @NotNull org.bukkit.block.data.BlockData blockData) - Specified by:
sendBlockChange
in interfaceorg.bukkit.entity.Player
-
sendBlockChange
Sends the givenBlockChangeMessage
if it's in a chunk this player can see.- Parameters:
message
- the message to send
-
sendBlockChangeForce
Deprecated. -
sendBlockDamage
public void sendBlockDamage(@NotNull @NotNull org.bukkit.Location location, float v) - Specified by:
sendBlockDamage
in interfaceorg.bukkit.entity.Player
-
sendChunkChange
public boolean sendChunkChange(org.bukkit.Location loc, int sx, int sy, int sz, byte[] data) - Specified by:
sendChunkChange
in interfaceorg.bukkit.entity.Player
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location location, @Nullable @Nullable List<net.kyori.adventure.text.Component> list) throws IllegalArgumentException - Specified by:
sendSignChange
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location location, @Nullable @Nullable List<net.kyori.adventure.text.Component> list, @NotNull @NotNull org.bukkit.DyeColor dyeColor) throws IllegalArgumentException - Specified by:
sendSignChange
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(org.bukkit.Location location, String[] lines) throws IllegalArgumentException - Specified by:
sendSignChange
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(@NotNull @NotNull org.bukkit.Location location, @Nullable @Nullable String[] strings, @NotNull @NotNull org.bukkit.DyeColor dyeColor) throws IllegalArgumentException - Specified by:
sendSignChange
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
-
sendSignChange
public void sendSignChange(SignEntity sign, org.bukkit.Location location, TextMessage[] lines) throws IllegalArgumentException Send a sign change, similar tosendSignChange(Location, String[])
, but using complete TextMessages instead of strings.- Parameters:
sign
- the signlocation
- the location of the signlines
- the new text on the sign or null to clear it- Throws:
IllegalArgumentException
- if location is nullIllegalArgumentException
- if lines is non-null and has a length less than 4
-
sendBlockEntityChange
public void sendBlockEntityChange(org.bukkit.Location location, GlowBlockEntity type, CompoundTag nbt) Send a block entity change to the given location.- Parameters:
location
- The location of the block entity.type
- The type of block entity being sent.nbt
- The NBT structure to send to the client.
-
sendMap
public void sendMap(org.bukkit.map.MapView map) - Specified by:
sendMap
in interfaceorg.bukkit.entity.Player
-
setTitleTimes
public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks) - Specified by:
setTitleTimes
in interfaceorg.bukkit.entity.Player
-
setSubtitle
public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle) - Specified by:
setSubtitle
in interfaceorg.bukkit.entity.Player
-
setSubtitle
public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle) - Specified by:
setSubtitle
in interfaceorg.bukkit.entity.Player
-
showTitle
public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title) - Specified by:
showTitle
in interfaceorg.bukkit.entity.Player
-
showTitle
public void showTitle(net.md_5.bungee.api.chat.BaseComponent title) - Specified by:
showTitle
in interfaceorg.bukkit.entity.Player
-
showTitle
public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) - Specified by:
showTitle
in interfaceorg.bukkit.entity.Player
-
showTitle
public void showTitle(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) - Specified by:
showTitle
in interfaceorg.bukkit.entity.Player
-
sendTitle
public void sendTitle(com.destroystokyo.paper.Title title) - Specified by:
sendTitle
in interfaceorg.bukkit.entity.Player
-
sendTitle
- Specified by:
sendTitle
in interfaceorg.bukkit.entity.Player
-
sendTitle
- Specified by:
sendTitle
in interfaceorg.bukkit.entity.Player
-
sendTitle
public void sendTitle(com.destroystokyo.paper.Title.Builder title) Send the player a title base on aTitle.Builder
.- Parameters:
title
- theTitle.Builder
to send the player
-
sendTitle
public void sendTitle()Send the player their current title. -
updateTitle
public void updateTitle(com.destroystokyo.paper.Title title) - Specified by:
updateTitle
in interfaceorg.bukkit.entity.Player
-
updateTitle
Update a specific attribute of the player's title.- Parameters:
action
- the attribute to updatevalue
- the value of the attribute
-
hideTitle
public void hideTitle()- Specified by:
hideTitle
in interfaceorg.bukkit.entity.Player
-
getStatistic
- Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
getStatistic
public int getStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
getStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, int newValue) throws IllegalArgumentException - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int newValue) throws IllegalArgumentException - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
setStatistic
public void setStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int newValue) - Specified by:
setStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, int amount) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
incrementStatistic
public void incrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) throws IllegalArgumentException - Specified by:
incrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
- Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, int amount) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.Material material, int amount) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType) throws IllegalArgumentException - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
- Throws:
IllegalArgumentException
-
decrementStatistic
public void decrementStatistic(org.bukkit.Statistic statistic, org.bukkit.entity.EntityType entityType, int amount) - Specified by:
decrementStatistic
in interfaceorg.bukkit.OfflinePlayer
-
getStatisticMap
-
sendStats
public void sendStats() -
updateInventory
public void updateInventory()- Specified by:
updateInventory
in interfaceorg.bukkit.entity.Player
-
sendItemChange
public void sendItemChange(int slot, org.bukkit.inventory.ItemStack item) Sends aSetWindowSlotMessage
to update the contents of an inventory slot.- Parameters:
slot
- the slot IDitem
- the new contents
-
setItemOnCursor
public void setItemOnCursor(org.bukkit.inventory.ItemStack item) Description copied from class:GlowHumanEntity
The item the player has on their cursor.- Specified by:
setItemOnCursor
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
setItemOnCursor
in classGlowHumanEntity
-
hasCooldown
public boolean hasCooldown(org.bukkit.Material material) - Specified by:
hasCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
getCooldown
public int getCooldown(org.bukkit.Material material) - Specified by:
getCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
setCooldown
public void setCooldown(org.bukkit.Material material, int ticks) - Specified by:
setCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
isDeeplySleeping
public boolean isDeeplySleeping()- Specified by:
isDeeplySleeping
in interfaceorg.bukkit.entity.HumanEntity
-
getPotentialBedLocation
@Nullable public @Nullable org.bukkit.Location getPotentialBedLocation()- Specified by:
getPotentialBedLocation
in interfaceorg.bukkit.entity.HumanEntity
-
getMainHand
public org.bukkit.inventory.MainHand getMainHand()- Specified by:
getMainHand
in interfaceorg.bukkit.entity.HumanEntity
-
setWindowProperty
public boolean setWindowProperty(org.bukkit.inventory.InventoryView.Property prop, int value) - Specified by:
setWindowProperty
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
setWindowProperty
in classGlowHumanEntity
-
openInventory
public void openInventory(org.bukkit.inventory.InventoryView view) - Specified by:
openInventory
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
openInventory
in classGlowHumanEntity
-
openMerchant
public org.bukkit.inventory.InventoryView openMerchant(org.bukkit.entity.Villager villager, boolean b) - Specified by:
openMerchant
in interfaceorg.bukkit.entity.HumanEntity
-
openMerchant
public org.bukkit.inventory.InventoryView openMerchant(org.bukkit.inventory.Merchant merchant, boolean b) - Specified by:
openMerchant
in interfaceorg.bukkit.entity.HumanEntity
-
openAnvil
@Nullable public @Nullable org.bukkit.inventory.InventoryView openAnvil(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openAnvil
in interfaceorg.bukkit.entity.HumanEntity
-
openCartographyTable
@Nullable public @Nullable org.bukkit.inventory.InventoryView openCartographyTable(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openCartographyTable
in interfaceorg.bukkit.entity.HumanEntity
-
openGrindstone
@Nullable public @Nullable org.bukkit.inventory.InventoryView openGrindstone(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openGrindstone
in interfaceorg.bukkit.entity.HumanEntity
-
openLoom
@Nullable public @Nullable org.bukkit.inventory.InventoryView openLoom(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openLoom
in interfaceorg.bukkit.entity.HumanEntity
-
openSmithingTable
@Nullable public @Nullable org.bukkit.inventory.InventoryView openSmithingTable(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openSmithingTable
in interfaceorg.bukkit.entity.HumanEntity
-
openStonecutter
@Nullable public @Nullable org.bukkit.inventory.InventoryView openStonecutter(@Nullable @Nullable org.bukkit.Location location, boolean b) - Specified by:
openStonecutter
in interfaceorg.bukkit.entity.HumanEntity
-
drop
Description copied from class:GlowHumanEntity
Spawns a newGlowItem
in the world, as if this HumanEntity had dropped it.Note that this does NOT remove the item from the inventory.
- Overrides:
drop
in classGlowHumanEntity
- Parameters:
stack
- The item to drop- Returns:
- the GlowItem that was generated, or null if the spawning was cancelled
-
setPlayerTime
public void setPlayerTime(long time, boolean relative) - Specified by:
setPlayerTime
in interfaceorg.bukkit.entity.Player
-
getPlayerTime
public long getPlayerTime()- Specified by:
getPlayerTime
in interfaceorg.bukkit.entity.Player
-
getPlayerTimeOffset
public long getPlayerTimeOffset()- Specified by:
getPlayerTimeOffset
in interfaceorg.bukkit.entity.Player
-
resetPlayerTime
public void resetPlayerTime()- Specified by:
resetPlayerTime
in interfaceorg.bukkit.entity.Player
-
sendTime
public void sendTime()Sends aTimeMessage
with the time of day. -
getPlayerWeather
public org.bukkit.WeatherType getPlayerWeather()- Specified by:
getPlayerWeather
in interfaceorg.bukkit.entity.Player
-
setPlayerWeather
public void setPlayerWeather(org.bukkit.WeatherType type) - Specified by:
setPlayerWeather
in interfaceorg.bukkit.entity.Player
-
resetPlayerWeather
public void resetPlayerWeather()- Specified by:
resetPlayerWeather
in interfaceorg.bukkit.entity.Player
-
sendWeather
public void sendWeather()Sends aStateChangeMessage
with the current weather. -
sendRainDensity
public void sendRainDensity() -
sendSkyDarkness
public void sendSkyDarkness() -
hidePlayer
public void hidePlayer(org.bukkit.entity.Player player) - Specified by:
hidePlayer
in interfaceorg.bukkit.entity.Player
-
hidePlayer
public void hidePlayer(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player) - Specified by:
hidePlayer
in interfaceorg.bukkit.entity.Player
-
showPlayer
public void showPlayer(org.bukkit.entity.Player player) - Specified by:
showPlayer
in interfaceorg.bukkit.entity.Player
-
showPlayer
public void showPlayer(org.bukkit.plugin.Plugin plugin, org.bukkit.entity.Player player) - Specified by:
showPlayer
in interfaceorg.bukkit.entity.Player
-
canSee
public boolean canSee(org.bukkit.entity.Player player) - Specified by:
canSee
in interfaceorg.bukkit.entity.Player
-
stopHidingDisconnectedPlayer
public void stopHidingDisconnectedPlayer(org.bukkit.entity.Player player) Called when a player hidden to this player disconnects. This is necessary so the player is visible again after they reconnected.- Parameters:
player
- The disconnected player
-
getScoreboard
public org.bukkit.scoreboard.Scoreboard getScoreboard()- Specified by:
getScoreboard
in interfaceorg.bukkit.entity.Player
-
setScoreboard
public void setScoreboard(org.bukkit.scoreboard.Scoreboard scoreboard) throws IllegalArgumentException, IllegalStateException - Specified by:
setScoreboard
in interfaceorg.bukkit.entity.Player
- Throws:
IllegalArgumentException
IllegalStateException
-
isConversing
public boolean isConversing()- Specified by:
isConversing
in interfaceorg.bukkit.conversations.Conversable
-
acceptConversationInput
- Specified by:
acceptConversationInput
in interfaceorg.bukkit.conversations.Conversable
-
beginConversation
public boolean beginConversation(org.bukkit.conversations.Conversation conversation) - Specified by:
beginConversation
in interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(org.bukkit.conversations.Conversation conversation) - Specified by:
abandonConversation
in interfaceorg.bukkit.conversations.Conversable
-
abandonConversation
public void abandonConversation(org.bukkit.conversations.Conversation conversation, org.bukkit.conversations.ConversationAbandonedEvent details) - Specified by:
abandonConversation
in interfaceorg.bukkit.conversations.Conversable
-
sendPluginMessage
- Specified by:
sendPluginMessage
in interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannels
in interfaceorg.bukkit.plugin.messaging.PluginMessageRecipient
-
addChannel
Add a listening channel to this player.- Parameters:
channel
- The channel to add.
-
removeChannel
Remove a listening channel from this player.- Parameters:
channel
- The channel to remove.
-
enchanted
public void enchanted(int clicked) Updates level after enchanting.- Parameters:
clicked
- the enchanting-table slot used: 0 for top, 1 for middle, 2 for bottom
-
getTitle
public com.destroystokyo.paper.Title getTitle() -
clearTitle
public void clearTitle()- Specified by:
clearTitle
in interfacenet.kyori.adventure.audience.Audience
-
setOnGround
public void setOnGround(boolean onGround) Description copied from class:GlowEntity
Sets the on-ground flag and clears fall distance.- Overrides:
setOnGround
in classGlowLivingEntity
- Parameters:
onGround
- true if this entity is now on the ground; false otherwise
-
resetTitle
public void resetTitle()- Specified by:
resetTitle
in interfacenet.kyori.adventure.audience.Audience
- Specified by:
resetTitle
in interfaceorg.bukkit.entity.Player
-
setDigging
Starts breaking a block.- Parameters:
block
- the block to start breaking
-
isInWater
public boolean isInWater()Returns true if the player is inside a water block.- Specified by:
isInWater
in interfaceorg.bukkit.entity.Entity
- Overrides:
isInWater
in classGlowEntity
- Returns:
- True if entity is in water.
-
playAnimationToSelf
public void playAnimationToSelf(org.bukkit.EntityAnimation animation) - Specified by:
playAnimationToSelf
in interfaceorg.bukkit.entity.Player
-
addBossBar
public void addBossBar(org.bukkit.boss.BossBar bar) Add a boss bar.- Parameters:
bar
- the boss bar to add
-
removeBossBar
public void removeBossBar(org.bukkit.boss.BossBar bar) Remove a boss bar.- Parameters:
bar
- the boss bar to remove
-
getBossBars
Returns a collection of the boss bars this player sees.- Returns:
- the boss bars this player sees
-
getOpenWindowId
public int getOpenWindowId()Gets the currently open window ID.- Returns:
- the currently open window ID, -1 if there is no open window
-
getSession
The network session attached to this player.- Returns:
- The GlowSession of the player.
-
getFirstPlayed
public long getFirstPlayed()The time the player first played, or 0 if unknown.- Specified by:
getFirstPlayed
in interfaceorg.bukkit.OfflinePlayer
-
getLastPlayed
public long getLastPlayed()The time the player last played, or 0 if unknown.- Specified by:
getLastPlayed
in interfaceorg.bukkit.OfflinePlayer
-
getRecipeMonitor
-
setAffectsSpawning
public void setAffectsSpawning(boolean affectsSpawning) - Specified by:
setAffectsSpawning
in interfaceorg.bukkit.entity.Player
-
getJoinTime
public long getJoinTime()The time the player joined, in milliseconds, to be saved as last played time.- Returns:
- The player's join time.
-
getTotalExperience
public int getTotalExperience()Cumulative amount of experience points the player has collected.- Specified by:
getTotalExperience
in interfaceorg.bukkit.entity.Player
-
getLevel
public int getLevel()The current level (or skill point amount) of the player.- Specified by:
getLevel
in interfaceorg.bukkit.entity.Player
-
getExp
public float getExp()The progress made to the next level, from 0 to 1.- Specified by:
getExp
in interfaceorg.bukkit.entity.Player
-
getFoodLevel
public int getFoodLevel()The human entity's current food level.- Specified by:
getFoodLevel
in interfaceorg.bukkit.entity.HumanEntity
-
getExhaustion
public float getExhaustion()The player's current exhaustion level.- Specified by:
getExhaustion
in interfaceorg.bukkit.entity.HumanEntity
-
setExhaustion
public void setExhaustion(float exhaustion) The player's current exhaustion level.- Specified by:
setExhaustion
in interfaceorg.bukkit.entity.HumanEntity
-
getSaturation
public float getSaturation()The player's current saturation level.- Specified by:
getSaturation
in interfaceorg.bukkit.entity.HumanEntity
-
isHealthScaled
public boolean isHealthScaled()Whether to perform special scaling of the player's health.- Specified by:
isHealthScaled
in interfaceorg.bukkit.entity.Player
-
getHealthScale
public double getHealthScale()The scale at which to display the player's health.- Specified by:
getHealthScale
in interfaceorg.bukkit.entity.Player
-
isSeenCredits
public boolean isSeenCredits()If this player has seen the end credits. -
setSeenCredits
public void setSeenCredits(boolean seenCredits) If this player has seen the end credits. -
isPlayerTimeRelative
public boolean isPlayerTimeRelative()Whether the time offset is relative.- Specified by:
isPlayerTimeRelative
in interfaceorg.bukkit.entity.Player
-
getCompassTarget
public org.bukkit.Location getCompassTarget()The player's compass target.- Specified by:
getCompassTarget
in interfaceorg.bukkit.entity.Player
-
isBedSpawnForced
public boolean isBedSpawnForced()Whether to use the bed spawn even if there is no bed block.- Returns:
- Whether the player is forced to spawn at their bed.
-
getHurtDirection
public float getHurtDirection()Description copied from class:GlowLivingEntity
The entity's hurt direction (angle).- Specified by:
getHurtDirection
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getHurtDirection
in classGlowLivingEntity
-
setHurtDirection
public void setHurtDirection(float hurtDirection) Description copied from class:GlowLivingEntity
The entity's hurt direction (angle).- Specified by:
setHurtDirection
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
setHurtDirection
in classGlowLivingEntity
-
isFlying
public boolean isFlying()Whether the player is currently flying.- Specified by:
isFlying
in interfaceorg.bukkit.entity.Player
-
getFlySpeed
public float getFlySpeed()The player's base flight speed.- Specified by:
getFlySpeed
in interfaceorg.bukkit.entity.Player
-
getWalkSpeed
public float getWalkSpeed()The player's base walking speed.- Specified by:
getWalkSpeed
in interfaceorg.bukkit.entity.Player
-
getDigging
The one block the player is currently digging. -
getUsageItem
public org.bukkit.inventory.ItemStack getUsageItem()The one itemstack the player is currently usage and associated time. -
setUsageItem
public void setUsageItem(org.bukkit.inventory.ItemStack usageItem) The one itemstack the player is currently usage and associated time. -
getUsageTime
public int getUsageTime() -
getStartingUsageTime
public int getStartingUsageTime() -
getEnderPearlCooldown
public int getEnderPearlCooldown()The player's ender pearl cooldown game tick counter. 1 second, or 20 game ticks by default. The player can use ender pearl again if equals 0. -
setEnderPearlCooldown
public void setEnderPearlCooldown(int enderPearlCooldown) The player's ender pearl cooldown game tick counter. 1 second, or 20 game ticks by default. The player can use ender pearl again if equals 0. -
getPlayerListHeader
- Specified by:
getPlayerListHeader
in interfaceorg.bukkit.entity.Player
-
setPlayerListHeader
- Specified by:
setPlayerListHeader
in interfaceorg.bukkit.entity.Player
-