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.Gets the text background color.int
Gets the maximum line width before wrapping.getText()
Deprecated.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) Sets the text background color.void
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
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.entity.Display
getBillboard, getBrightness, getDisplayHeight, getDisplayWidth, getGlowColorOverride, getInterpolationDelay, getInterpolationDuration, getShadowRadius, getShadowStrength, getTeleportDuration, getTransformation, getViewRange, setBillboard, setBrightness, setDisplayHeight, setDisplayWidth, setGlowColorOverride, setInterpolationDelay, setInterpolationDuration, setShadowRadius, setShadowStrength, setTeleportDuration, setTransformation, setTransformationMatrix, setViewRange
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 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
Gets the text background color.- Returns:
- the background color
-
setBackgroundColor
Sets 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
-
text()