Package org.bukkit.entity
Interface TextDisplay
- All Superinterfaces:
Audience
,CommandSender
,Display
,Entity
,HoverEventSource<HoverEvent.ShowEntity>
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,Pointered
,ServerOperator
,Sound.Emitter
Represents a text display entity.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents possible text alignments for this display.Nested classes/interfaces inherited from interface org.bukkit.entity.Display
Display.Billboard, Display.Brightness
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
Entity.Spigot
-
Method Summary
Modifier and TypeMethodDescriptionGets the text alignment for this display.Deprecated.API subject to changeint
Gets the maximum line width before wrapping.getText()
Deprecated.in favour oftext()
byte
Gets the text opacity.boolean
Gets if the text has its default background.boolean
Gets if the text is see through.boolean
Gets if the text is shadowed.void
setAlignment
(@NotNull TextDisplay.TextAlignment alignment) Sets the text alignment for this display.void
setBackgroundColor
(@Nullable Color color) Deprecated.API subject to changevoid
setDefaultBackground
(boolean defaultBackground) Sets if the text has its default background.void
setLineWidth
(int width) Sets the maximum line width before wrapping.void
setSeeThrough
(boolean seeThrough) Sets if the text is see through.void
setShadowed
(boolean shadow) Sets if the text is shadowed.void
Deprecated.in favour oftext(net.kyori.adventure.text.Component)
void
setTextOpacity
(byte opacity) Sets the text opacity.text()
Gets the displayed text.void
Sets the displayed text.Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, 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, sendRichMessage
Methods inherited from interface org.bukkit.entity.Display
getBillboard, getBrightness, getDisplayHeight, getDisplayWidth, getGlowColorOverride, getInterpolationDelay, getInterpolationDuration, getShadowRadius, getShadowStrength, getTransformation, getViewRange, setBillboard, setBrightness, setDisplayHeight, setDisplayWidth, setGlowColorOverride, setInterpolationDelay, setInterpolationDuration, setShadowRadius, setShadowStrength, setTransformation, setTransformationMatrix, setViewRange
Methods inherited from interface org.bukkit.entity.Entity
addPassenger, addScoreboardTag, asHoverEvent, collidesAt, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, 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 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
-
getText
Deprecated.in favour oftext()
Gets the displayed text.- Returns:
- the displayed text.
-
setText
Deprecated.in favour oftext(net.kyori.adventure.text.Component)
Sets the displayed text.- Parameters:
text
- the new text
-
text
Gets the displayed text.- Returns:
- the displayed text
-
text
Sets the displayed text.- Parameters:
text
- the new text
-
getLineWidth
int getLineWidth()Gets the maximum line width before wrapping.- Returns:
- the line width
-
setLineWidth
void setLineWidth(int width) Sets the maximum line width before wrapping.- Parameters:
width
- new line width
-
getBackgroundColor
Deprecated.API subject to changeGets the text background color.- Returns:
- the background color
-
setBackgroundColor
Deprecated.API subject to changeSets the text background color.- Parameters:
color
- new background color
-
getTextOpacity
byte getTextOpacity()Gets the text opacity.- Returns:
- opacity or -1 if not set
-
setTextOpacity
void setTextOpacity(byte opacity) Sets the text opacity.- Parameters:
opacity
- new opacity or -1 if default
-
isShadowed
boolean isShadowed()Gets if the text is shadowed.- Returns:
- shadow status
-
setShadowed
void setShadowed(boolean shadow) Sets if the text is shadowed.- Parameters:
shadow
- if shadowed
-
isSeeThrough
boolean isSeeThrough()Gets if the text is see through.- Returns:
- see through status
-
setSeeThrough
void setSeeThrough(boolean seeThrough) Sets if the text is see through.- Parameters:
seeThrough
- if see through
-
isDefaultBackground
boolean isDefaultBackground()Gets if the text has its default background.- Returns:
- default background
-
setDefaultBackground
void setDefaultBackground(boolean defaultBackground) Sets if the text has its default background.- Parameters:
defaultBackground
- if default
-
getAlignment
Gets the text alignment for this display.- Returns:
- text alignment
-
setAlignment
Sets the text alignment for this display.- Parameters:
alignment
- new alignment
-