Interface TextDisplay
- All Superinterfaces:
Audience, CommandSender, DataComponentView, Display, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ServerOperator, Sound.Emitter
Represents a text display entity.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents possible text alignments for this display.Nested classes/interfaces inherited from interface Display
Display.Billboard, Display.BrightnessNested classes/interfaces inherited from interface Entity
Entity.Spigot -
Method Summary
Modifier and TypeMethodDescriptionGets the text alignment for this display.Gets the text background color.intGets the maximum line width before wrapping.getText()Deprecated.byteGets the text opacity.booleanGets if the text has its default background.booleanGets if the text is seen through.booleanGets if the text is shadowed.voidsetAlignment(@NotNull TextDisplay.TextAlignment alignment) Sets the text alignment for this display.voidsetBackgroundColor(@Nullable Color color) Sets the text background color.voidsetDefaultBackground(boolean defaultBackground) Sets if the text has its default background.voidsetLineWidth(int width) Sets the maximum line width before wrapping.voidsetSeeThrough(boolean seeThrough) Sets if the text is seen through.voidsetShadowed(boolean shadow) Sets if the text is shadowed.voidDeprecated.in favour oftext(net.kyori.adventure.text.Component)voidsetTextOpacity(byte opacity) Sets the text opacity.text()Gets the displayed text.voidSets the displayed text.Methods inherited from interface Audience
clearResourcePacks, clearTitle, closeDialog, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, removeResourcePacks, 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, showDialog, showTitle, stopSound, stopSoundMethods inherited from interface CommandSender
getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlainMessage, sendRichMessage, sendRichMessageMethods inherited from interface DataComponentView
getData, getDataOrDefault, hasDataMethods inherited from interface 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, setViewRangeMethods inherited from interface Entity
addPassenger, addScoreboardTag, asHoverEvent, broadcastHurtAnimation, collidesAt, copy, copy, createSnapshot, eject, fromMobSpawner, getAsString, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPickItemStack, getPistonMoveReaction, getPitch, getPortalCooldown, getPose, getScheduler, getScoreboardEntryName, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getVisualFire, getWidth, getWorld, getX, getY, getYaw, getZ, hasFixedPose, hasGravity, hasNoPhysics, isCustomNameVisible, isDead, isEmpty, isFreezeTickingLocked, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInPowderedSnow, isInRain, isInsideVehicle, isInvisible, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isInWorld, isOnGround, isPersistent, isSilent, isSneaking, isTicking, isTrackedBy, isUnderWater, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, lockFreezeTicks, lookAt, lookAt, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvisible, setInvulnerable, setLastDamageCause, setNoPhysics, setPassenger, setPersistent, setPortalCooldown, setPose, setPose, setRotation, setSilent, setSneaking, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync, teleportAsync, teleportAsync, wouldCollideUsingMethods inherited from interface HoverEventSource
asHoverEventMethods inherited from interface Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachmentMethods inherited from interface PersistentDataHolder
getPersistentDataContainerMethods inherited from interface Pointered
get, getOrDefault, getOrDefaultFrom, pointersMethods inherited from interface ServerOperator
isOp, setOp
-
Method Details
-
getText
-
setText
Deprecated.in favour oftext(net.kyori.adventure.text.Component)Sets the displayed text.- Parameters:
text- the new text
-
text
-
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
-
setBackgroundColor
-
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 seen through.- Returns:
- see through status
-
setSeeThrough
void setSeeThrough(boolean seeThrough) Sets if the text is seen 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()