接口 TextDisplay
- 所有超级接口:
CommandSender,Display,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,ServerOperator
表示文本显示实体。
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 org.bukkit.entity.Display
Display.Billboard, Display.Brightness从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明获取此显示的文本对齐方式。获取文本背景颜色。int获取换行前的最大行宽。getText()获取显示的文本。byte获取文本不透明度。boolean获取文本是否有默认背景。boolean获取文本是否透明。boolean获取文本是否有阴影。voidsetAlignment(@NotNull TextDisplay.TextAlignment alignment) 设置此显示的文本对齐方式。voidsetBackgroundColor(@Nullable Color color) 设置文本背景颜色。voidsetDefaultBackground(boolean defaultBackground) 设置文本是否有默认背景。voidsetLineWidth(int width) 设置换行前的最大行宽。voidsetSeeThrough(boolean seeThrough) 设置文本是否透明。voidsetShadowed(boolean shadow) 设置文本是否有阴影。void设置显示的文本。voidsetTextOpacity(byte 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.
-
setText
设置显示的文本。- 参数:
text- 新文本原文:Sets the displayed text.
text- the new text
-
getLineWidth
int getLineWidth()获取换行前的最大行宽。- 返回:
- 行宽
原文:Gets the maximum line width before wrapping.
-
setLineWidth
void setLineWidth(int width) 设置换行前的最大行宽。- 参数:
width- 新行宽原文:Sets the maximum line width before wrapping.
width- new line width
-
getBackgroundColor
获取文本背景颜色。- 返回:
- 背景颜色
原文:Gets the text background color.
-
setBackgroundColor
设置文本背景颜色。- 参数:
color- 新背景颜色原文:Sets the text background color.
color- new background color
-
getTextOpacity
byte getTextOpacity()获取文本不透明度。- 返回:
- 不透明度,如果未设置则返回-1
原文:Gets the text opacity.
-
setTextOpacity
void setTextOpacity(byte opacity) 设置文本不透明度。- 参数:
opacity- 新不透明度,如果为默认值则为-1原文:Sets the text opacity.
opacity- new opacity or -1 if default
-
isShadowed
boolean isShadowed()获取文本是否有阴影。- 返回:
- 阴影状态
原文:Gets if the text is shadowed.
-
setShadowed
void setShadowed(boolean shadow) 设置文本是否有阴影。- 参数:
shadow- 是否有阴影原文:Sets if the text is shadowed.
shadow- if shadowed
-
isSeeThrough
boolean isSeeThrough()获取文本是否透明。- 返回:
- 透明状态
原文:Gets if the text is see through.
-
setSeeThrough
void setSeeThrough(boolean seeThrough) 设置文本是否透明。- 参数:
seeThrough- 是否透明原文:Sets if the text is see through.
seeThrough- if see through
-
isDefaultBackground
boolean isDefaultBackground()获取文本是否有默认背景。- 返回:
- 默认背景
原文:Gets if the text has its default background.
-
setDefaultBackground
void setDefaultBackground(boolean defaultBackground) 设置文本是否有默认背景。- 参数:
defaultBackground- 是否为默认原文:Sets if the text has its default background.
defaultBackground- if default
-
getAlignment
获取此显示的文本对齐方式。- 返回:
- 文本对齐方式
原文:Gets the text alignment for this display.
-
setAlignment
设置此显示的文本对齐方式。- 参数:
alignment- 新对齐方式原文:Sets the text alignment for this display.
alignment- new alignment
-