Class SignMock

All Implemented Interfaces:
org.bukkit.block.BlockState, org.bukkit.block.Sign, org.bukkit.block.TileState, org.bukkit.material.Colorable, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

public class SignMock extends TileStateMock implements org.bukkit.block.Sign
Mock implementation of a Sign.
See Also:
  • Constructor Details

    • SignMock

      public SignMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new SignMock for the provided Material. Only supports materials in Tag.SIGNS
      Parameters:
      material - The material this state is for.
    • SignMock

      protected SignMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new SignMock for the provided Block. Only supports materials in Tag.SIGNS
      Parameters:
      block - The block this state is for.
    • SignMock

      protected SignMock(@NotNull @NotNull SignMock state)
      Constructs a new SignMock by cloning the data from an existing one.
      Parameters:
      state - The state to clone.
  • Method Details

    • lines

      @NotNull public @NotNull List<net.kyori.adventure.text.Component> lines()
      Specified by:
      lines in interface org.bukkit.block.Sign
    • line

      @NotNull public @NotNull net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException
      Specified by:
      line in interface org.bukkit.block.Sign
      Throws:
      IndexOutOfBoundsException
    • line

      public void line(int index, @NotNull @NotNull net.kyori.adventure.text.Component line) throws IndexOutOfBoundsException
      Specified by:
      line in interface org.bukkit.block.Sign
      Throws:
      IndexOutOfBoundsException
    • getLines

      @NotNull @Deprecated(since="1.16") public @NotNull String @NotNull [] getLines()
      Deprecated.
      Specified by:
      getLines in interface org.bukkit.block.Sign
    • getLine

      @Deprecated(since="1.16") @NotNull public @NotNull String getLine(int index) throws IndexOutOfBoundsException
      Deprecated.
      Specified by:
      getLine in interface org.bukkit.block.Sign
      Throws:
      IndexOutOfBoundsException
    • setLine

      @Deprecated(since="1.16") public void setLine(int index, String line) throws IndexOutOfBoundsException
      Deprecated.
      Specified by:
      setLine in interface org.bukkit.block.Sign
      Throws:
      IndexOutOfBoundsException
    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in interface org.bukkit.block.Sign
    • setEditable

      public void setEditable(boolean editable)
      Specified by:
      setEditable in interface org.bukkit.block.Sign
    • isGlowingText

      public boolean isGlowingText()
      Specified by:
      isGlowingText in interface org.bukkit.block.Sign
    • setGlowingText

      public void setGlowingText(boolean glowing)
      Specified by:
      setGlowingText in interface org.bukkit.block.Sign
    • getColor

      @NotNull public @NotNull org.bukkit.DyeColor getColor()
      Specified by:
      getColor in interface org.bukkit.material.Colorable
      Specified by:
      getColor in interface org.bukkit.block.Sign
    • setColor

      public void setColor(@NotNull @NotNull org.bukkit.DyeColor color)
      Specified by:
      setColor in interface org.bukkit.material.Colorable
      Specified by:
      setColor in interface org.bukkit.block.Sign
    • isWaxed

      public boolean isWaxed()
      Specified by:
      isWaxed in interface org.bukkit.block.Sign
    • setWaxed

      public void setWaxed(boolean waxed)
      Specified by:
      setWaxed in interface org.bukkit.block.Sign
    • getSide

      @NotNull public @NotNull org.bukkit.block.sign.SignSide getSide(@NotNull @NotNull org.bukkit.block.sign.Side side)
      Specified by:
      getSide in interface org.bukkit.block.Sign
    • getTargetSide

      @NotNull public @NotNull org.bukkit.block.sign.SignSide getTargetSide(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      getTargetSide in interface org.bukkit.block.Sign
    • getAllowedEditor

      @Nullable public @Nullable org.bukkit.entity.Player getAllowedEditor()
      Specified by:
      getAllowedEditor in interface org.bukkit.block.Sign
    • getInteractableSideFor

      @NotNull public @NotNull org.bukkit.block.sign.Side getInteractableSideFor(double x, double z)
      Specified by:
      getInteractableSideFor in interface org.bukkit.block.Sign
    • getSnapshot

      @NotNull public @NotNull org.bukkit.block.BlockState getSnapshot()
      Description copied from class: BlockStateMock
      This returns a copy of this BlockStateMock. Inheritents of this class should override this method!
      Specified by:
      getSnapshot in class TileStateMock
      Returns:
      A snapshot of this BlockStateMock.