Class CommandBlockMock

All Implemented Interfaces:
CommandBlockHolderMock, io.papermc.paper.command.CommandBlockHolder, org.bukkit.block.BlockState, org.bukkit.block.CommandBlock, org.bukkit.block.TileState, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

public class CommandBlockMock extends TileStateMock implements org.bukkit.block.CommandBlock, CommandBlockHolderMock
  • Constructor Details

    • CommandBlockMock

      protected CommandBlockMock(@NotNull @NotNull org.bukkit.Material material)
    • CommandBlockMock

      protected CommandBlockMock(@NotNull @NotNull org.bukkit.block.Block block)
    • CommandBlockMock

      protected CommandBlockMock(@NotNull @NotNull CommandBlockMock state)
  • Method Details

    • getSnapshot

      @NotNull public @NotNull CommandBlockMock 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.
    • getCommand

      @NotNull public @NotNull String getCommand()
      Specified by:
      getCommand in interface org.bukkit.block.CommandBlock
      Specified by:
      getCommand in interface io.papermc.paper.command.CommandBlockHolder
    • setCommand

      public void setCommand(@Nullable @Nullable String command)
      Specified by:
      setCommand in interface org.bukkit.block.CommandBlock
      Specified by:
      setCommand in interface io.papermc.paper.command.CommandBlockHolder
    • getName

      @NotNull public @NotNull String getName()
      Specified by:
      getName in interface org.bukkit.block.CommandBlock
    • setName

      public void setName(@Nullable @Nullable String name)
      Specified by:
      setName in interface org.bukkit.block.CommandBlock
    • name

      @NotNull public @NotNull net.kyori.adventure.text.Component name()
      Specified by:
      name in interface org.bukkit.block.CommandBlock
    • name

      public void name(@Nullable @Nullable net.kyori.adventure.text.Component name)
      Specified by:
      name in interface org.bukkit.block.CommandBlock