程序包 org.bukkit.entity

# 接口 TextDisplay

所有超级接口:
  `CommandSender`, `Display`, `Entity`, `Metadatable`, `Nameable`, `Permissible`, `PersistentDataHolder`, `ServerOperator`

public interface TextDisplay extends Display
Represents a text display entity.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  接口
  说明
  `static enum`
  `TextDisplay.TextAlignment`
  Represents possible text alignments for this display.

  ## 从接口继承的嵌套类/接口 org.bukkit.entity.Display

  `Display.Billboard, Display.Brightness`

  ## 从接口继承的嵌套类/接口 org.bukkit.entity.Entity

  `Entity.Spigot`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull TextDisplay.TextAlignment`
  `getAlignment()`
  Gets the text alignment for this display.
  `@Nullable Color`
  `getBackgroundColor()`
  Gets the text background color.
  `int`
  `getLineWidth()`
  Gets the maximum line width before wrapping.
  `@Nullable String`
  `getText()`
  Gets the displayed text.
  `byte`
  `getTextOpacity()`
  Gets the text opacity.
  `boolean`
  `isDefaultBackground()`
  Gets if the text has its default background.
  `boolean`
  `isSeeThrough()`
  Gets if the text is see through.
  `boolean`
  `isShadowed()`
  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`
  `setText(@Nullable String text)`
  Sets the displayed text.
  `void`
  `setTextOpacity(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

    @Nullable @Nullable String getText()
    Gets the displayed text.
    返回:
      the displayed text.

  - ### setText

    void setText(@Nullable @Nullable String text)
    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

    @Nullable @Nullable Color getBackgroundColor()
    Gets the text background color.
    返回:
      the background color

  - ### setBackgroundColor

    void setBackgroundColor(@Nullable @Nullable Color color)
    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

    @NotNull @NotNull TextDisplay.TextAlignment getAlignment()
    Gets the text alignment for this display.
    返回:
      text alignment

  - ### setAlignment

    void setAlignment(@NotNull @NotNull TextDisplay.TextAlignment alignment)
    Sets the text alignment for this display.
    参数:
      `alignment` - new alignment