Package net.glowstone.entity.objects
Class GlowItem
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.objects.GlowItem
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>,org.bukkit.command.CommandSender,org.bukkit.entity.Entity,org.bukkit.entity.Item,org.bukkit.metadata.Metadatable,org.bukkit.Nameable,org.bukkit.permissions.Permissible,org.bukkit.permissions.ServerOperator,org.bukkit.persistence.PersistentDataHolder
Represents an item that is also an
GlowEntity within the world.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot -
Field Summary
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
ConstructorsConstructorDescriptionGlowItem(org.bukkit.Location location, org.bukkit.inventory.ItemStack item) Creates a new item entity. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanList<com.flowpowered.network.Message>Creates a list ofMessages which can be sent to a client to spawn this entity.@NotNull org.bukkit.inventory.ItemStackgetOwner()intThe remaining delay until this item may be picked up.@NotNull org.bukkit.entity.EntityTypegetType()voidpulse()Called every game cycle.protected voidvoidsetBias(GlowPlayer bias) A player to bias this item's pickup selection towards.voidsetCanMobPickup(boolean canMobPickup) voidsetCanPlayerPickup(boolean canPlayerPickup) voidsetItemStack(@NotNull org.bukkit.inventory.ItemStack stack) voidvoidsetPickupDelay(int pickupDelay) The remaining delay until this item may be picked up.voidsetThrower(UUID thrower) voidsetWillAge(boolean willAge) booleanwillAge()Methods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, createUpdateMessage, customName, customName, damage, damage, damage, damage, eject, entityInteract, equals, fromMobSpawner, getBoundingBox, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, reset, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, updateBoundingBoxMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageMethods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, 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, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsyncMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
GlowItem
public GlowItem(org.bukkit.Location location, org.bukkit.inventory.ItemStack item) Creates a new item entity.- Parameters:
location- The location of the entity.item- The item stack the entity is carrying.
-
-
Method Details
-
getType
@NotNull public @NotNull org.bukkit.entity.EntityType getType()- Specified by:
getTypein interfaceorg.bukkit.entity.Entity- Overrides:
getTypein classGlowEntity
-
pulse
public void pulse()Description copied from class:GlowEntityCalled every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.- Overrides:
pulsein classGlowEntity
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysicsin classGlowEntity
-
createSpawnMessage
Description copied from class:GlowEntityCreates a list ofMessages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Specified by:
createSpawnMessagein classGlowEntity- Returns:
- A list of messages which can spawn this entity.
-
getItemStack
@NotNull public @NotNull org.bukkit.inventory.ItemStack getItemStack()- Specified by:
getItemStackin interfaceorg.bukkit.entity.Item
-
setItemStack
public void setItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack stack) - Specified by:
setItemStackin interfaceorg.bukkit.entity.Item
-
canMobPickup
public boolean canMobPickup()- Specified by:
canMobPickupin interfaceorg.bukkit.entity.Item
-
canPlayerPickup
public boolean canPlayerPickup()- Specified by:
canPlayerPickupin interfaceorg.bukkit.entity.Item
-
willAge
public boolean willAge()- Specified by:
willAgein interfaceorg.bukkit.entity.Item
-
getPickupDelay
public int getPickupDelay()The remaining delay until this item may be picked up.- Specified by:
getPickupDelayin interfaceorg.bukkit.entity.Item
-
setPickupDelay
public void setPickupDelay(int pickupDelay) The remaining delay until this item may be picked up.- Specified by:
setPickupDelayin interfaceorg.bukkit.entity.Item
-
setBias
A player to bias this item's pickup selection towards. -
setCanMobPickup
public void setCanMobPickup(boolean canMobPickup) - Specified by:
setCanMobPickupin interfaceorg.bukkit.entity.Item
-
setCanPlayerPickup
public void setCanPlayerPickup(boolean canPlayerPickup) - Specified by:
setCanPlayerPickupin interfaceorg.bukkit.entity.Item
-
setWillAge
public void setWillAge(boolean willAge) - Specified by:
setWillAgein interfaceorg.bukkit.entity.Item
-
getOwner
- Specified by:
getOwnerin interfaceorg.bukkit.entity.Item
-
setOwner
- Specified by:
setOwnerin interfaceorg.bukkit.entity.Item
-
getThrower
- Specified by:
getThrowerin interfaceorg.bukkit.entity.Item
-
setThrower
- Specified by:
setThrowerin interfaceorg.bukkit.entity.Item
-