Package org.bukkit.entity
Interface ItemFrame
- All Superinterfaces:
Attachable
,Audience
,CommandSender
,Directional
,Entity
,Hanging
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,ServerOperator
,Sound.Emitter
- All Known Subinterfaces:
GlowItemFrame
Represents an Item Frame
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptiongetItem()
Get the item in this framefloat
Gets the chance of the item being dropped upon this frame's destruction.Get the rotation of the frame's itemboolean
isFixed()
Returns whether the item frame is "fixed" or not.boolean
Returns whether the item frame is visible or not.void
setFixed
(boolean fixed) Sets whether the item frame should be fixed or not.void
Set the item in this framevoid
Set the item in this framevoid
setItemDropChance
(float chance) Sets the chance of the off hand item being dropped upon this frame's destruction.void
setRotation
(@NotNull Rotation rotation) Set the rotation of the frame's itemvoid
setVisible
(boolean visible) Sets whether the item frame should be visible or not.Methods inherited from interface org.bukkit.material.Attachable
getAttachedFace
Methods inherited from interface net.kyori.adventure.audience.Audience
clearResourcePacks, clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, removeResourcePacks, removeResourcePacks, removeResourcePacks, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendResourcePacks, sendResourcePacks, sendResourcePacks, sendTitlePart, showBossBar, showTitle, stopSound, stopSound
Methods inherited from interface org.bukkit.command.CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessage
Methods inherited from interface org.bukkit.material.Directional
getFacing, setFacingDirection
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getRider, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasRider, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isImmuneToFire, isInBubbleColumn, isInDaylight, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isRidable, isRidableInWater, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setImmuneToFire, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, wouldCollideUsing
Methods inherited from interface org.bukkit.entity.Hanging
setFacingDirection
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
-
Method Details
-
getItem
Get the item in this frame- Returns:
- a defensive copy the item in this item frame
-
setItem
Set the item in this frame- Parameters:
item
- the new item
-
setItem
Set the item in this frame- Parameters:
item
- the new itemplaySound
- whether or not to play the item placement sound
-
getItemDropChance
float getItemDropChance()Gets the chance of the item being dropped upon this frame's destruction.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
- Returns:
- chance of the off hand item being dropped
-
setItemDropChance
void setItemDropChance(float chance) Sets the chance of the off hand item being dropped upon this frame's destruction.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
- Parameters:
chance
- the chance of off hand item being dropped
-
getRotation
Get the rotation of the frame's item- Returns:
- the direction
-
setRotation
Set the rotation of the frame's item- Parameters:
rotation
- the new rotation- Throws:
IllegalArgumentException
- if rotation is null
-
isVisible
boolean isVisible()Returns whether the item frame is visible or not.- Returns:
- whether the item frame is visible or not
-
setVisible
void setVisible(boolean visible) Sets whether the item frame should be visible or not.- Parameters:
visible
- whether the item frame is visible or not
-
isFixed
boolean isFixed()Returns whether the item frame is "fixed" or not. When true it's not possible to destroy/move the frame (e.g. by damage, interaction, pistons, or missing supporting blocks), rotate the item or place/remove items.- Returns:
- whether the item frame is fixed or not
-
setFixed
void setFixed(boolean fixed) Sets whether the item frame should be fixed or not. When set to true it's not possible to destroy/move the frame (e.g. by damage, interaction, pistons, or missing supporting blocks), rotate the item or place/remove items.- Parameters:
fixed
- whether the item frame is fixed or not
-