Package net.glowstone.entity
Class GlowHumanEntity
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.GlowLivingEntity
net.glowstone.entity.GlowHumanEntity
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience
,net.kyori.adventure.pointer.Pointered
,net.kyori.adventure.sound.Sound.Emitter
,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>
,org.bukkit.attribute.Attributable
,org.bukkit.command.CommandSender
,org.bukkit.entity.AnimalTamer
,org.bukkit.entity.Damageable
,org.bukkit.entity.Entity
,org.bukkit.entity.HumanEntity
,org.bukkit.entity.LivingEntity
,org.bukkit.inventory.InventoryHolder
,org.bukkit.metadata.Metadatable
,org.bukkit.Nameable
,org.bukkit.permissions.Permissible
,org.bukkit.permissions.ServerOperator
,org.bukkit.persistence.PersistentDataHolder
,org.bukkit.projectiles.ProjectileSource
- Direct Known Subclasses:
GlowPlayer
public abstract class GlowHumanEntity
extends GlowLivingEntity
implements org.bukkit.entity.HumanEntity
Represents a human entity, such as an NPC or a player.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.bukkit.permissions.PermissibleBase
This human's PermissibleBase for permissions.protected boolean
Whether this human is sleeping or not.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
ConstructorDescriptionGlowHumanEntity
(org.bukkit.Location location, GlowPlayerProfile profile) Creates a human within the specified world and with the specified name. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.permissions.PermissionAttachment
addAttachment
(org.bukkit.plugin.Plugin plugin) org.bukkit.permissions.PermissionAttachment
addAttachment
(org.bukkit.plugin.Plugin plugin, int ticks) org.bukkit.permissions.PermissionAttachment
addAttachment
(org.bukkit.plugin.Plugin plugin, String name, boolean value) org.bukkit.permissions.PermissionAttachment
addAttachment
(org.bukkit.plugin.Plugin plugin, String name, boolean value, int ticks) boolean
canTakeDamage
(org.bukkit.event.entity.EntityDamageEvent.DamageCause damageCause) Get whether this entity should take damage from the specified source.void
void
closeInventory
(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) List<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.boolean
discoverRecipe
(@NotNull org.bukkit.NamespacedKey recipe) int
discoverRecipes
(@NotNull Collection<org.bukkit.NamespacedKey> recipes) drop
(org.bukkit.inventory.ItemStack stack) Spawns a newGlowItem
in the world, as if this HumanEntity had dropped it.boolean
dropItem
(boolean dropAll) void
dropItemInHand
(boolean wholeStack) Drops the item this entity currently has in its hands and remove the item from the HumanEntity's inventory.float
@NotNull org.bukkit.Location
int
getCooldown
(@NotNull org.bukkit.Material material) @NotNull Set<org.bukkit.NamespacedKey>
Set<org.bukkit.permissions.PermissionAttachmentInfo>
The ender chest inventory of this human.org.bukkit.inventory.EntityEquipment
float
int
int
org.bukkit.GameMode
The player's active game mode.The inventory of this human.org.bukkit.inventory.ItemStack
@Nullable org.bukkit.inventory.ItemStack
org.bukkit.inventory.ItemStack
The item the player has on their cursor.@Nullable org.bukkit.Location
@NotNull org.bukkit.inventory.MainHand
getName()
org.bukkit.inventory.InventoryView
The player's currently open inventory.@Nullable org.bukkit.Location
The player profile with name and UUID information.int
float
org.bukkit.entity.Entity
org.bukkit.entity.Entity
int
How long this human has been sleeping.int
int
int
The player's xpSeed.boolean
hasCooldown
(@NotNull org.bukkit.Material material) boolean
hasDiscoveredRecipe
(@NotNull org.bukkit.NamespacedKey recipe) boolean
hasPermission
(String name) boolean
hasPermission
(org.bukkit.permissions.Permission perm) boolean
boolean
boolean
isOp()
Whether this human is considered an op.boolean
isPermissionSet
(String name) boolean
isPermissionSet
(org.bukkit.permissions.Permission perm) boolean
Whether this human is sleeping or not.@Nullable org.bukkit.inventory.InventoryView
openAnvil
(@Nullable org.bukkit.Location location, boolean force) @Nullable org.bukkit.inventory.InventoryView
openCartographyTable
(@Nullable org.bukkit.Location location, boolean force) org.bukkit.inventory.InventoryView
openEnchanting
(org.bukkit.Location location, boolean force) @Nullable org.bukkit.inventory.InventoryView
openGrindstone
(@Nullable org.bukkit.Location location, boolean force) org.bukkit.inventory.InventoryView
openInventory
(org.bukkit.inventory.Inventory inventory) void
openInventory
(org.bukkit.inventory.InventoryView inventory) @Nullable org.bukkit.inventory.InventoryView
openLoom
(@Nullable org.bukkit.Location location, boolean force) @Nullable org.bukkit.inventory.InventoryView
openMerchant
(@NotNull org.bukkit.entity.Villager trader, boolean force) @Nullable org.bukkit.inventory.InventoryView
openMerchant
(@NotNull org.bukkit.inventory.Merchant merchant, boolean force) void
openSign
(org.bukkit.block.Sign sign) @Nullable org.bukkit.inventory.InventoryView
openSmithingTable
(@Nullable org.bukkit.Location location, boolean force) @Nullable org.bukkit.inventory.InventoryView
openStonecutter
(@Nullable org.bukkit.Location location, boolean force) org.bukkit.inventory.InventoryView
openWorkbench
(org.bukkit.Location location, boolean force) void
pulse()
Called every game cycle.void
org.bukkit.entity.Entity
org.bukkit.entity.Entity
void
removeAttachment
(org.bukkit.permissions.PermissionAttachment attachment) void
setCooldown
(@NotNull org.bukkit.Material material, int ticks) void
setExhaustion
(float value) void
setFireTicks
(int ticks) How long the entity has been on fire, or 0 if it is not.void
setFoodLevel
(int value) void
setGameMode
(org.bukkit.GameMode gameMode) The player's active game mode.void
setItemInHand
(org.bukkit.inventory.ItemStack item) void
setItemOnCursor
(org.bukkit.inventory.ItemStack itemOnCursor) The item the player has on their cursor.void
setLastDeathLocation
(@Nullable org.bukkit.Location location) void
void
setOp
(boolean value) Whether this entity has operator permissions.void
void
setSaturatedRegenRate
(int ticks) void
setSaturation
(float value) void
setShoulderEntityLeft
(org.bukkit.entity.Entity entity) void
setShoulderEntityRight
(org.bukkit.entity.Entity entity) void
setStarvationRate
(int ticks) void
setUniqueId
(UUID uuid) Sets this entity's unique identifier if possible.void
setUnsaturatedRegenRate
(int ticks) boolean
setWindowProperty
(org.bukkit.inventory.InventoryView.Property prop, int value) void
setXpSeed
(int xpSeed) The player's xpSeed.boolean
sleep
(@NotNull org.bukkit.Location location, boolean force) boolean
undiscoverRecipe
(@NotNull org.bukkit.NamespacedKey recipe) int
undiscoverRecipes
(@NotNull Collection<org.bukkit.NamespacedKey> recipes) void
wakeup
(boolean setSpawnLocation) Methods inherited from class net.glowstone.entity.GlowLivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, clearActivePotionEffects, createUpdateMessage, damage, entityInteract, getAbsorptionAmount, getActiveItem, getActivePotionEffects, getAmbientDelay, getAmbientSound, getArrowCooldown, getArrowsInBody, getArrowsStuck, getAttribute, getAttributeManager, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getDeathSound, getDeathTicks, getEquipmentMonitor, getEyeHeight, getEyeHeight, getEyeLocation, getFreezeTicks, getHandRaised, getHandRaisedTime, getHeadYaw, getHealth, getHurtDirection, getHurtSound, getItemUseRemainingTime, getKiller, getLastDamage, getLastDamager, getLastTwoTargetBlocks, getLineOfSight, getMaxFreezeTicks, getMaxHealth, getMaximumAir, getMaximumNoDamageTicks, getMemory, getMovement, getNoDamageTicks, getPlayerDamageTick, getPotionEffect, getRemainingAir, getRemoveWhenFarAway, getShieldBlockingDelay, getSoundPitch, getSoundVolume, getSpawnCategory, getSpeed, getState, getTargetBlock, getTargetBlock, getTargetBlockExact, getTargetBlockExact, getTargetBlockFace, getTargetBlockInfo, getTargetEntity, getTargetEntityInfo, getTaskManager, getTrackedPlayers, getVelocityFromMovement, hasAI, hasLineOfSight, hasLineOfSight, hasPotionEffect, isArthropod, isClimbing, isCollidable, isFallFlying, isFreezeTickingLocked, isFrozen, isGliding, isHandRaised, isInPowderedSnow, isInvisible, isJumping, isRiptiding, isSwimming, isUndead, isVisualFire, isWithinSolidBlock, jump, launchProjectile, launchProjectile, launchProjectile, launchProjectile, lockFreezeTicks, name, playAnimation, playPickupItemAnimation, pulsePhysics, rayTraceBlocks, rayTraceBlocks, registerAttribute, removePotionEffect, reset, resetMaxHealth, setAbsorptionAmount, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setFallFlying, setFreezeTicks, setGliding, setHeadYaw, setHealth, setHurtDirection, setInvisible, setJumping, setKiller, setLastDamage, setLastDamager, setMaxHealth, setMaximumAir, setMaximumNoDamageTicks, setMemory, setMovement, setNoDamageTicks, setOnGround, setPlayerDamageTick, setRemainingAir, setRemoveWhenFarAway, setShieldBlockingDelay, setSpeed, setState, setSwimming, setVisualFire, spawnAt, swingMainHand, swingOffHand, teamDisplayName, tryUseTotem, updatePotionEffectsMetadata
Methods inherited from class net.glowstone.entity.GlowEntity
addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, customName, customName, damage, damage, damage, eject, equals, fromMobSpawner, getBoundingBox, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEntityId, getEntitySpawnReason, 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, getType, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, remove, removeMetadata, removePassenger, removeScoreboardTag, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, 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
clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, 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.bukkit.command.CommandSender
name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage
Methods inherited from interface org.bukkit.entity.Damageable
damage, damage, getAbsorptionAmount, getHealth, getMaxHealth, resetMaxHealth, setAbsorptionAmount, setHealth, setMaxHealth
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getTicksLived, getTrackedPlayers, getType, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface org.bukkit.entity.HumanEntity
isHandRaised
Methods inherited from interface org.bukkit.entity.LivingEntity
addPotionEffect, addPotionEffect, addPotionEffects, attack, clearActiveItem, getActiveItem, getActivePotionEffects, getArrowCooldown, getArrowsInBody, getArrowsStuck, getBeeStingerCooldown, getBeeStingersInBody, getCanPickupItems, getCategory, getCollidableExemptions, getEyeHeight, getEyeHeight, getEyeLocation, getHandRaised, getHandRaisedTime, getHurtDirection, getItemUseRemainingTime, 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, hasLineOfSight, hasPotionEffect, isClimbing, isCollidable, isGliding, isInvisible, isJumping, isLeashed, isRiptiding, isSwimming, playPickupItemAnimation, playPickupItemAnimation, rayTraceBlocks, rayTraceBlocks, removePotionEffect, setAI, setArrowCooldown, setArrowsInBody, setArrowsStuck, setBeeStingerCooldown, setBeeStingersInBody, setCanPickupItems, setCollidable, setGliding, setHurtDirection, 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.permissions.Permissible
permissionValue, permissionValue
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
Methods inherited from interface org.bukkit.projectiles.ProjectileSource
launchProjectile, launchProjectile
-
Field Details
-
sleeping
protected boolean sleepingWhether this human is sleeping or not. -
permissions
protected org.bukkit.permissions.PermissibleBase permissionsThis human's PermissibleBase for permissions.
-
-
Constructor Details
-
GlowHumanEntity
Creates a human within the specified world and with the specified name.- Parameters:
location
- The location.profile
- The human's profile with name and UUID information.
-
-
Method Details
-
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 classGlowLivingEntity
- Returns:
- A list of messages which can spawn this entity.
-
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 classGlowLivingEntity
-
getName
- Specified by:
getName
in interfaceorg.bukkit.entity.AnimalTamer
- Specified by:
getName
in interfaceorg.bukkit.command.CommandSender
- Specified by:
getName
in interfaceorg.bukkit.entity.HumanEntity
- Overrides:
getName
in classGlowEntity
-
getMainHand
@NotNull public @NotNull org.bukkit.inventory.MainHand getMainHand()- Specified by:
getMainHand
in interfaceorg.bukkit.entity.HumanEntity
-
getUniqueId
- Specified by:
getUniqueId
in interfaceorg.bukkit.entity.AnimalTamer
- Specified by:
getUniqueId
in interfaceorg.bukkit.entity.Entity
- Overrides:
getUniqueId
in classGlowEntity
-
setUniqueId
Description copied from class:GlowEntity
Sets this entity's unique identifier if possible.- Overrides:
setUniqueId
in classGlowEntity
- Parameters:
uuid
- The new UUID. Must not be null.
-
isBlocking
public boolean isBlocking()- Specified by:
isBlocking
in interfaceorg.bukkit.entity.HumanEntity
-
getItemInUse
@Nullable public @Nullable org.bukkit.inventory.ItemStack getItemInUse()- Specified by:
getItemInUse
in interfaceorg.bukkit.entity.HumanEntity
-
getExpToLevel
public int getExpToLevel()- Specified by:
getExpToLevel
in interfaceorg.bukkit.entity.HumanEntity
-
getEquipment
public org.bukkit.inventory.EntityEquipment getEquipment()- Specified by:
getEquipment
in interfaceorg.bukkit.entity.HumanEntity
- Specified by:
getEquipment
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
getEquipment
in classGlowLivingEntity
-
setFireTicks
public void setFireTicks(int ticks) Description copied from class:GlowEntity
How long the entity has been on fire, or 0 if it is not.- Specified by:
setFireTicks
in interfaceorg.bukkit.entity.Entity
- Overrides:
setFireTicks
in classGlowEntity
-
isPermissionSet
- Specified by:
isPermissionSet
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
isPermissionSet
in classGlowEntity
-
isPermissionSet
public boolean isPermissionSet(org.bukkit.permissions.Permission perm) - Specified by:
isPermissionSet
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
isPermissionSet
in classGlowEntity
-
hasPermission
- Specified by:
hasPermission
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
hasPermission
in classGlowEntity
-
hasPermission
public boolean hasPermission(org.bukkit.permissions.Permission perm) - Specified by:
hasPermission
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
hasPermission
in classGlowEntity
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin) - Specified by:
addAttachment
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
addAttachment
in classGlowEntity
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, int ticks) - Specified by:
addAttachment
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
addAttachment
in classGlowEntity
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value) - Specified by:
addAttachment
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
addAttachment
in classGlowEntity
-
addAttachment
public org.bukkit.permissions.PermissionAttachment addAttachment(org.bukkit.plugin.Plugin plugin, String name, boolean value, int ticks) - Specified by:
addAttachment
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
addAttachment
in classGlowEntity
-
removeAttachment
public void removeAttachment(org.bukkit.permissions.PermissionAttachment attachment) - Specified by:
removeAttachment
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
removeAttachment
in classGlowEntity
-
recalculatePermissions
public void recalculatePermissions()- Specified by:
recalculatePermissions
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
recalculatePermissions
in classGlowEntity
-
getEffectivePermissions
- Specified by:
getEffectivePermissions
in interfaceorg.bukkit.permissions.Permissible
- Overrides:
getEffectivePermissions
in classGlowEntity
-
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 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 classGlowLivingEntity
- Parameters:
damageCause
- the damage source to check- Returns:
- whether this entity can take damage from the source
-
getItemInHand
public org.bukkit.inventory.ItemStack getItemInHand()- Specified by:
getItemInHand
in interfaceorg.bukkit.entity.HumanEntity
-
setItemInHand
public void setItemInHand(org.bukkit.inventory.ItemStack item) - Specified by:
setItemInHand
in interfaceorg.bukkit.entity.HumanEntity
-
hasCooldown
public boolean hasCooldown(@NotNull @NotNull org.bukkit.Material material) - Specified by:
hasCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
getCooldown
public int getCooldown(@NotNull @NotNull org.bukkit.Material material) - Specified by:
getCooldown
in interfaceorg.bukkit.entity.HumanEntity
-
setCooldown
public void setCooldown(@NotNull @NotNull 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
-
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
-
setWindowProperty
public boolean setWindowProperty(org.bukkit.inventory.InventoryView.Property prop, int value) - Specified by:
setWindowProperty
in interfaceorg.bukkit.entity.HumanEntity
-
openInventory
public org.bukkit.inventory.InventoryView openInventory(org.bukkit.inventory.Inventory inventory) - Specified by:
openInventory
in interfaceorg.bukkit.entity.HumanEntity
-
openInventory
public void openInventory(org.bukkit.inventory.InventoryView inventory) - Specified by:
openInventory
in interfaceorg.bukkit.entity.HumanEntity
-
openMerchant
@Nullable public @Nullable org.bukkit.inventory.InventoryView openMerchant(@NotNull @NotNull org.bukkit.entity.Villager trader, boolean force) - Specified by:
openMerchant
in interfaceorg.bukkit.entity.HumanEntity
-
openMerchant
@Nullable public @Nullable org.bukkit.inventory.InventoryView openMerchant(@NotNull @NotNull org.bukkit.inventory.Merchant merchant, boolean force) - Specified by:
openMerchant
in interfaceorg.bukkit.entity.HumanEntity
-
openAnvil
@Nullable public @Nullable org.bukkit.inventory.InventoryView openAnvil(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openAnvil
in interfaceorg.bukkit.entity.HumanEntity
-
openCartographyTable
@Nullable public @Nullable org.bukkit.inventory.InventoryView openCartographyTable(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openCartographyTable
in interfaceorg.bukkit.entity.HumanEntity
-
openGrindstone
@Nullable public @Nullable org.bukkit.inventory.InventoryView openGrindstone(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openGrindstone
in interfaceorg.bukkit.entity.HumanEntity
-
openLoom
@Nullable public @Nullable org.bukkit.inventory.InventoryView openLoom(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openLoom
in interfaceorg.bukkit.entity.HumanEntity
-
openSmithingTable
@Nullable public @Nullable org.bukkit.inventory.InventoryView openSmithingTable(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openSmithingTable
in interfaceorg.bukkit.entity.HumanEntity
-
openStonecutter
@Nullable public @Nullable org.bukkit.inventory.InventoryView openStonecutter(@Nullable @Nullable org.bukkit.Location location, boolean force) - Specified by:
openStonecutter
in interfaceorg.bukkit.entity.HumanEntity
-
openWorkbench
public org.bukkit.inventory.InventoryView openWorkbench(org.bukkit.Location location, boolean force) - Specified by:
openWorkbench
in interfaceorg.bukkit.entity.HumanEntity
-
openEnchanting
public org.bukkit.inventory.InventoryView openEnchanting(org.bukkit.Location location, boolean force) - Specified by:
openEnchanting
in interfaceorg.bukkit.entity.HumanEntity
-
closeInventory
public void closeInventory()- Specified by:
closeInventory
in interfaceorg.bukkit.entity.HumanEntity
-
closeInventory
public void closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) - Specified by:
closeInventory
in interfaceorg.bukkit.entity.HumanEntity
-
dropItemInHand
public void dropItemInHand(boolean wholeStack) Drops the item this entity currently has in its hands and remove the item from the HumanEntity's inventory.- Parameters:
wholeStack
- True if the whole stack should be dropped
-
drop
Spawns a newGlowItem
in the world, as if this HumanEntity had dropped it.Note that this does NOT remove the item from the inventory.
- Parameters:
stack
- The item to drop- Returns:
- the GlowItem that was generated, or null if the spawning was cancelled
- Throws:
IllegalArgumentException
- if the stack is empty
-
getShoulderEntityLeft
public org.bukkit.entity.Entity getShoulderEntityLeft()- Specified by:
getShoulderEntityLeft
in interfaceorg.bukkit.entity.HumanEntity
-
setShoulderEntityLeft
public void setShoulderEntityLeft(org.bukkit.entity.Entity entity) - Specified by:
setShoulderEntityLeft
in interfaceorg.bukkit.entity.HumanEntity
-
getShoulderEntityRight
public org.bukkit.entity.Entity getShoulderEntityRight()- Specified by:
getShoulderEntityRight
in interfaceorg.bukkit.entity.HumanEntity
-
setShoulderEntityRight
public void setShoulderEntityRight(org.bukkit.entity.Entity entity) - Specified by:
setShoulderEntityRight
in interfaceorg.bukkit.entity.HumanEntity
-
releaseLeftShoulderEntity
public org.bukkit.entity.Entity releaseLeftShoulderEntity()- Specified by:
releaseLeftShoulderEntity
in interfaceorg.bukkit.entity.HumanEntity
-
releaseRightShoulderEntity
public org.bukkit.entity.Entity releaseRightShoulderEntity()- Specified by:
releaseRightShoulderEntity
in interfaceorg.bukkit.entity.HumanEntity
-
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 recipe) - Specified by:
hasDiscoveredRecipe
in interfaceorg.bukkit.entity.HumanEntity
-
getDiscoveredRecipes
- Specified by:
getDiscoveredRecipes
in interfaceorg.bukkit.entity.HumanEntity
-
getLeftShoulderTag
-
setLeftShoulderTag
-
getRightShoulderTag
-
setRightShoulderTag
-
openSign
public void openSign(org.bukkit.block.Sign sign) - Specified by:
openSign
in interfaceorg.bukkit.entity.HumanEntity
-
dropItem
public boolean dropItem(boolean dropAll) - Specified by:
dropItem
in interfaceorg.bukkit.entity.HumanEntity
-
getExhaustion
public float getExhaustion()- Specified by:
getExhaustion
in interfaceorg.bukkit.entity.HumanEntity
-
setExhaustion
public void setExhaustion(float value) - Specified by:
setExhaustion
in interfaceorg.bukkit.entity.HumanEntity
-
getSaturation
public float getSaturation()- Specified by:
getSaturation
in interfaceorg.bukkit.entity.HumanEntity
-
setSaturation
public void setSaturation(float value) - Specified by:
setSaturation
in interfaceorg.bukkit.entity.HumanEntity
-
getFoodLevel
public int getFoodLevel()- Specified by:
getFoodLevel
in interfaceorg.bukkit.entity.HumanEntity
-
setFoodLevel
public void setFoodLevel(int value) - 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 ticks) - 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 ticks) - 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 ticks) - Specified by:
setStarvationRate
in interfaceorg.bukkit.entity.HumanEntity
-
getLastDeathLocation
@Nullable public @Nullable org.bukkit.Location getLastDeathLocation()- Specified by:
getLastDeathLocation
in interfaceorg.bukkit.entity.HumanEntity
-
setLastDeathLocation
public void setLastDeathLocation(@Nullable @Nullable org.bukkit.Location location) - Specified by:
setLastDeathLocation
in interfaceorg.bukkit.entity.HumanEntity
-
getProfile
The player profile with name and UUID information. -
getInventory
The inventory of this human.- Specified by:
getInventory
in interfaceorg.bukkit.entity.HumanEntity
- Specified by:
getInventory
in interfaceorg.bukkit.inventory.InventoryHolder
-
getEnderChest
The ender chest inventory of this human.- Specified by:
getEnderChest
in interfaceorg.bukkit.entity.HumanEntity
-
isSleeping
public boolean isSleeping()Whether this human is sleeping or not.- Specified by:
isSleeping
in interfaceorg.bukkit.entity.LivingEntity
- Overrides:
isSleeping
in classGlowLivingEntity
-
getItemOnCursor
public org.bukkit.inventory.ItemStack getItemOnCursor()The item the player has on their cursor.- Specified by:
getItemOnCursor
in interfaceorg.bukkit.entity.HumanEntity
-
setItemOnCursor
public void setItemOnCursor(org.bukkit.inventory.ItemStack itemOnCursor) The item the player has on their cursor.- Specified by:
setItemOnCursor
in interfaceorg.bukkit.entity.HumanEntity
-
getSleepTicks
public int getSleepTicks()How long this human has been sleeping.- Specified by:
getSleepTicks
in interfaceorg.bukkit.entity.HumanEntity
-
isOp
public boolean isOp()Whether this human is considered an op.- Specified by:
isOp
in interfaceorg.bukkit.permissions.ServerOperator
- Overrides:
isOp
in classGlowEntity
-
getGameMode
public org.bukkit.GameMode getGameMode()The player's active game mode.- Specified by:
getGameMode
in interfaceorg.bukkit.entity.HumanEntity
-
setGameMode
public void setGameMode(org.bukkit.GameMode gameMode) The player's active game mode.- Specified by:
setGameMode
in interfaceorg.bukkit.entity.HumanEntity
-
getOpenInventory
public org.bukkit.inventory.InventoryView getOpenInventory()The player's currently open inventory.- Specified by:
getOpenInventory
in interfaceorg.bukkit.entity.HumanEntity
-
getXpSeed
public int getXpSeed()The player's xpSeed. Used for calculation of enchantments. -
setXpSeed
public void setXpSeed(int xpSeed) The player's xpSeed. Used for calculation of enchantments.
-