Class OperationSafetyListener

java.lang.Object
dev.despical.mazeengine.listener.OperationSafetyListener
All Implemented Interfaces:
org.bukkit.event.Listener

public final class OperationSafetyListener extends Object implements org.bukkit.event.Listener
Prevents player and block interactions from disrupting active maze operations.

While a saved maze is busy, the listener blocks entry and teleportation into its volume, denies relevant block interactions, and suppresses block physics. Inventory opening, clicking, dragging, and hopper transfers are also checked against inventories located inside a busy maze.

World unload is cancelled when the world still contains a busy saved record. These guards protect an in-progress mutation independently of the ordinary terrain-protection toggle. The listener delegates spatial lookup and busy state to the service instead of maintaining its own operation registry.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    click(org.bukkit.event.inventory.InventoryClickEvent event)
     
    void
    drag(org.bukkit.event.inventory.InventoryDragEvent event)
     
    void
    hopper(org.bukkit.event.inventory.InventoryMoveItemEvent event)
     
    void
    interact(org.bukkit.event.player.PlayerInteractEvent event)
     
    void
    inventory(org.bukkit.event.inventory.InventoryOpenEvent event)
     
    void
    move(org.bukkit.event.player.PlayerMoveEvent event)
     
    void
    physics(org.bukkit.event.block.BlockPhysicsEvent event)
     
    void
    teleport(org.bukkit.event.player.PlayerTeleportEvent event)
     
    void
    unload(org.bukkit.event.world.WorldUnloadEvent event)
     

    Methods inherited from class Object

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

    • OperationSafetyListener

      public OperationSafetyListener(MazeEnginePlugin plugin)
  • Method Details

    • physics

      public void physics(org.bukkit.event.block.BlockPhysicsEvent event)
    • interact

      public void interact(org.bukkit.event.player.PlayerInteractEvent event)
    • inventory

      public void inventory(org.bukkit.event.inventory.InventoryOpenEvent event)
    • click

      public void click(org.bukkit.event.inventory.InventoryClickEvent event)
    • drag

      public void drag(org.bukkit.event.inventory.InventoryDragEvent event)
    • hopper

      public void hopper(org.bukkit.event.inventory.InventoryMoveItemEvent event)
    • move

      public void move(org.bukkit.event.player.PlayerMoveEvent event)
    • teleport

      public void teleport(org.bukkit.event.player.PlayerTeleportEvent event)
    • unload

      public void unload(org.bukkit.event.world.WorldUnloadEvent event)