接口 TextDisplay
- 所有超级接口:
CommandSender,Display,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,ServerOperator
Represents a text display entity.
-
嵌套类概要
嵌套类修饰符和类型接口说明static enumRepresents possible text alignments for this display.从接口继承的嵌套类/接口 org.bukkit.entity.Display
Display.Billboard, Display.Brightness从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明Gets the text alignment for this display.Gets the text background color.intGets the maximum line width before wrapping.getText()Gets the displayed text.byteGets the text opacity.booleanGets if the text has its default background.booleanGets if the text is see 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 see through.voidsetShadowed(boolean shadow) Sets if the text is shadowed.voidSets the displayed text.voidsetTextOpacity(byte opacity) Sets the text opacity.从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage从接口继承的方法 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从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, 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, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, 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从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
getText
Gets the displayed text.- 返回:
- the displayed text.
-
setText
Sets the displayed text.- 参数:
text- the new text
-
getLineWidth
int getLineWidth()Gets the maximum line width before wrapping.- 返回:
- the line width
-
setLineWidth
void setLineWidth(int width) Sets the maximum line width before wrapping.- 参数:
width- new line width
-
getBackgroundColor
Gets the text background color.- 返回:
- the background color
-
setBackgroundColor
Sets the text background color.- 参数:
color- new background color
-
getTextOpacity
byte getTextOpacity()Gets the text opacity.- 返回:
- opacity or -1 if not set
-
setTextOpacity
void setTextOpacity(byte opacity) Sets the text opacity.- 参数:
opacity- new opacity or -1 if default
-
isShadowed
boolean isShadowed()Gets if the text is shadowed.- 返回:
- shadow status
-
setShadowed
void setShadowed(boolean shadow) Sets if the text is shadowed.- 参数:
shadow- if shadowed
-
isSeeThrough
boolean isSeeThrough()Gets if the text is see through.- 返回:
- see through status
-
setSeeThrough
void setSeeThrough(boolean seeThrough) Sets if the text is see through.- 参数:
seeThrough- if see through
-
isDefaultBackground
boolean isDefaultBackground()Gets if the text has its default background.- 返回:
- default background
-
setDefaultBackground
void setDefaultBackground(boolean defaultBackground) Sets if the text has its default background.- 参数:
defaultBackground- if default
-
getAlignment
Gets the text alignment for this display.- 返回:
- text alignment
-
setAlignment
Sets the text alignment for this display.- 参数:
alignment- new alignment
-