Package org.bukkit.entity
Interface TextDisplay
- All Superinterfaces:
CommandSender
,Display
,Entity
,Metadatable
,Nameable
,Permissible
,PersistentDataHolder
,ServerOperator
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()
Gets the displayed text.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
(TextDisplay.TextAlignment alignment) Sets the text alignment for this display.void
setBackgroundColor
(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
Sets the displayed text.void
setTextOpacity
(byte opacity) Sets the text opacity.Methods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage
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, eject, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
getCustomName, setCustomName
Methods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Method Details
-
getText
Gets the displayed text.- Returns:
- the displayed text.
-
setText
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
-