Package net.glowstone.entity.objects
Class GlowLeashHitch
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.GlowHangingEntity
net.glowstone.entity.objects.GlowLeashHitch
- 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.command.CommandSender
,org.bukkit.entity.Entity
,org.bukkit.entity.Hanging
,org.bukkit.entity.LeashHitch
,org.bukkit.material.Attachable
,org.bukkit.material.Directional
,org.bukkit.metadata.Metadatable
,org.bukkit.Nameable
,org.bukkit.permissions.Permissible
,org.bukkit.permissions.ServerOperator
,org.bukkit.persistence.PersistentDataHolder
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.entity.GlowHangingEntity
GlowHangingEntity.HangingFace
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot
-
Field Summary
Fields inherited from class net.glowstone.entity.GlowHangingEntity
facing
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
ConstructorDescriptionGlowLeashHitch
(org.bukkit.Location location) GlowLeashHitch
(org.bukkit.Location location, org.bukkit.block.BlockFace clickedface) Creates a leash hitch entity, for when a leash is hitched to a block such as a fencepost. -
Method Summary
Modifier and TypeMethodDescriptionList<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.boolean
entityInteract
(GlowPlayer player, InteractEntityMessage message) static org.bukkit.entity.LeashHitch
getLeashHitchAt
(org.bukkit.block.Block block) Get the Leash Hitch to which entities should be attached at the block.org.bukkit.entity.EntityType
getType()
static boolean
isAllowedLeashHolder
(org.bukkit.entity.EntityType type) Checks if an Entity of the specified type is allowed to be a leash holder.void
pulse()
Called every game cycle.void
setFacingDirection
(org.bukkit.block.BlockFace blockFace) boolean
setFacingDirection
(org.bukkit.block.BlockFace blockFace, boolean force) boolean
Checks whether this entity should be saved as part of the world.Methods inherited from class net.glowstone.entity.GlowHangingEntity
getAttachedFace, getFacing, getYaw
Methods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, createUpdateMessage, customName, customName, damage, damage, damage, damage, eject, equals, fromMobSpawner, getBoundingBox, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFallDistance, getFireTicks, getFreezeTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getTicksLived, getTrackedPlayers, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isVisualFire, isWithinDistance, isWithinDistance, leaveVehicle, lockFreezeTicks, name, playEffect, playEffectKnownAndSelf, pulsePhysics, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, reset, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, setVisualFire, spawnAt, spigot, teamDisplayName, 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.material.Attachable
getAttachedFace
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
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage
Methods inherited from interface org.bukkit.material.Directional
getFacing
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, getUniqueId, 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, setFireTicks, 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.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
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment
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.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
GlowLeashHitch
public GlowLeashHitch(org.bukkit.Location location) -
GlowLeashHitch
public GlowLeashHitch(org.bukkit.Location location, org.bukkit.block.BlockFace clickedface) Creates a leash hitch entity, for when a leash is hitched to a block such as a fencepost.- Parameters:
location
- the locationclickedface
- the side of the block that was clicked (TODO: what difference does this make?)
-
-
Method Details
-
getLeashHitchAt
public static org.bukkit.entity.LeashHitch getLeashHitchAt(org.bukkit.block.Block block) Get the Leash Hitch to which entities should be attached at the block. Useful if multiple Leash Hitches could exist.- Parameters:
block
- the Block to get the relevant Leash Hitch for- Returns:
- either an already existing Leash Hitch, or a newly spawned one
-
isAllowedLeashHolder
public static boolean isAllowedLeashHolder(org.bukkit.entity.EntityType type) Checks if an Entity of the specified type is allowed to be a leash holder.- Parameters:
type
- type of the entity which wishes to become a leash holder- Returns:
- if the type is allowed as a leash holder true, otherwise false
-
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.- Specified by:
createSpawnMessage
in classGlowEntity
- Returns:
- A list of messages which can spawn this entity.
-
getType
public org.bukkit.entity.EntityType getType()- Specified by:
getType
in interfaceorg.bukkit.entity.Entity
- Overrides:
getType
in classGlowEntity
-
setFacingDirection
public boolean setFacingDirection(org.bukkit.block.BlockFace blockFace, boolean force) - Specified by:
setFacingDirection
in interfaceorg.bukkit.entity.Hanging
-
setFacingDirection
public void setFacingDirection(org.bukkit.block.BlockFace blockFace) - Specified by:
setFacingDirection
in interfaceorg.bukkit.material.Directional
-
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 classGlowEntity
-
entityInteract
- Overrides:
entityInteract
in classGlowEntity
-