Interface MachineInteractions.Interaction

Enclosing class:
MachineInteractions

public static interface MachineInteractions.Interaction
What a machine type's block does; every method's default does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    A left-click.
    default void
    steppedOn(@NotNull MachineInstance machine, @NotNull org.bukkit.entity.Entity entity)
    An entity standing on the block (each tick it moves on it).
    default boolean
    A right-click (the item may be air).
  • Method Details

    • use

      default boolean use(@NotNull @NotNull MachineInteractions.Click click)
      A right-click (the item may be air).
      Returns:
      whether it was handled: the click is cancelled and no menu opens
    • attack

      default boolean attack(@NotNull @NotNull MachineInteractions.Click click)
      A left-click.
      Returns:
      whether it was handled: the click is cancelled, so the block does not start breaking
    • steppedOn

      default void steppedOn(@NotNull @NotNull MachineInstance machine, @NotNull @NotNull org.bukkit.entity.Entity entity)
      An entity standing on the block (each tick it moves on it).