Class PendingActions

java.lang.Object
dev.despical.mazeengine.service.PendingActions
All Implemented Interfaces:
AutoCloseable, org.bukkit.event.Listener

public final class PendingActions extends Object implements org.bukkit.event.Listener, AutoCloseable
Owns short-lived review tokens for destructive chat actions.

Deletion requests capture the issuing actor, exact saved record, terrain policy, and expiry before rendering confirm and dismiss controls. Confirm checks actor identity, lifetime, and record identity again so an old request cannot remove a regenerated maze or a replacement record under the same name.

Creation undo buttons use the same exact-record safeguard before delegating to authorized deletion. Expired requests are periodically discarded, player disconnect removes their requests, and shutdown clears the remaining tokens. The actual world removal still belongs to MazeService.

  • Constructor Details

  • Method Details

    • undoButton

      public net.kyori.adventure.text.Component undoButton(org.bukkit.command.CommandSender sender, MazeRecord created)
    • delete

      public void delete(org.bukkit.command.CommandSender sender, MazeRecord record, boolean restore)
    • confirm

      public void confirm(org.bukkit.command.CommandSender sender, String token)
    • dismiss

      public void dismiss(org.bukkit.command.CommandSender sender, String token)
    • quit

      public void quit(org.bukkit.event.player.PlayerQuitEvent event)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable