Class MachineEvent

java.lang.Object
org.bukkit.event.Event
fr.robie.machineengine.api.paper.event.MachineEvent
Direct Known Subclasses:
MachineCreateEvent, MachineLoadEvent, MachineProcessEvent, MachineRemoveEvent, MachineUnloadEvent, MachineUpgradeChangeEvent, PlayerMachineInteractEvent

public abstract class MachineEvent extends org.bukkit.event.Event
A MachineEngine event mirrored as a Bukkit event (ยง26). Fired on the machine's owner thread (its region on Folia); listeners must not block and must not keep the machine after the event.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MachineEvent(@NotNull MachineInstance machine)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.bukkit.Location
    The machine's block location, or null if its world is not loaded.
     
    @NotNull net.kyori.adventure.key.Key
     
    @Nullable org.bukkit.World
    The machine's world, or null if it is not loaded.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, getHandlers, isAsynchronous

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MachineEvent

      protected MachineEvent(@NotNull @NotNull MachineInstance machine)
  • Method Details

    • getMachine

      @NotNull public @NotNull MachineInstance getMachine()
    • getMachineType

      @NotNull public @NotNull net.kyori.adventure.key.Key getMachineType()
    • getWorld

      @Nullable public @Nullable org.bukkit.World getWorld()
      The machine's world, or null if it is not loaded.
    • getLocation

      @Nullable public @Nullable org.bukkit.Location getLocation()
      The machine's block location, or null if its world is not loaded.