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 TypeMethodDescriptiondefault booleanattack(@NotNull MachineInteractions.Click click) A left-click.default voidsteppedOn(@NotNull MachineInstance machine, @NotNull org.bukkit.entity.Entity entity) An entity standing on the block (each tick it moves on it).default booleanuse(@NotNull MachineInteractions.Click click) A right-click (the item may be air).
-
Method Details
-
use
A right-click (the item may be air).- Returns:
- whether it was handled: the click is cancelled and no menu opens
-
attack
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).
-