Class ConduitMock

All Implemented Interfaces:
org.bukkit.block.BlockState, org.bukkit.block.Conduit, org.bukkit.block.TileState, org.bukkit.metadata.Metadatable, org.bukkit.persistence.PersistentDataHolder

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

    • ConduitMock

      public ConduitMock(@NotNull @NotNull org.bukkit.Material material)
      Constructs a new ConduitMock for the provided Material. Only supports Material.CONDUIT
      Parameters:
      material - The material this state is for.
    • ConduitMock

      protected ConduitMock(@NotNull @NotNull org.bukkit.block.Block block)
      Constructs a new ConduitMock for the provided Block. Only supports Material.CONDUIT
      Parameters:
      block - The block this state is for.
    • ConduitMock

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

    • getSnapshot

      @NotNull public @NotNull ConduitMock 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.
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface org.bukkit.block.Conduit
    • getRange

      public int getRange()
      Specified by:
      getRange in interface org.bukkit.block.Conduit
    • getTarget

      @Nullable public @Nullable org.bukkit.entity.LivingEntity getTarget()
      Specified by:
      getTarget in interface org.bukkit.block.Conduit