LilsDeferred

LilsDeferred

Persistent command queues and scheduled actions for Paper servers.

2 downloads
1 followers

LilsDeferred Banner


🌸 What is LilsDeferred?

LilsDeferred is a lightweight utility plugin for Paper that allows server administrators to queue commands and actions to run later.

Tasks can either run after a specified amount of time or the next time a particular player joins the server.

Everything is persisted using SQLite, meaning queued tasks survive restarts and remain available for inspection, cancellation, retrying and historical review.

/deferred in 30m say The event has started!

/deferred player Lily next-login give Lily diamond 3

✨ Features

  • Persistent scheduled commands
  • Next-login player actions
  • SQLite storage
  • Automatic retry support
  • Crash-safe interrupted task handling
  • Paginated task history
  • Clickable task inspection
  • Configurable MiniMessage output
  • Granular permissions
  • Automatic history cleanup

⏰ Examples

/deferred in <duration> <command...>
/deferred player <player> next-login <command...>

📋 Commands

Command Description
/deferred in <duration> <command...> Schedule a command for later
/deferred player <player> next-login <command...> Queue a command for a player's next login
/deferred list [page] View stored deferred tasks
/deferred inspect <id> Inspect a task in detail
/deferred cancel <id> Cancel a pending or failed task
/deferred retry <id> Retry a failed task
/deferred reload Reload configuration and messages

Task entries shown by /deferred list include a clickable Inspect action for quickly opening the corresponding task.

🔐 Permissions

Permission Description
lilsdeferred.create Create scheduled and next-login tasks
lilsdeferred.list View stored task listings
lilsdeferred.manage Inspect, cancel and retry tasks
lilsdeferred.reload Reload configuration and messages
lilsdeferred.admin Grants all LilsDeferred permissions

All permissions default to server operators.

🏡 Architecture

LilsDeferred Diagram

LilsDeferred keeps its runtime, business logic and persistence layers deliberately separated.

Commands / PlayerJoinEvent
          │
          ▼
   DeferredTaskService
      │           │
      ▼           ▼
TaskRepository   ScheduledTaskQueue
      │                 │
      ▼                 ▼
    SQLite       ScheduledTaskRunner
                          │
                          ▼
                     TaskExecutor
                          │
                          ▼
                   Paper Main Thread

⚡ Performance

  • No normal SQL work on Paper's main thread
  • No recurring SQLite polling for scheduled tasks
  • Indexed database queries
  • Configurable backlog limits
  • Single dedicated database thread
  • WAL mode SQLite persistence

🛡️ Crash Safety

There is an unavoidable ambiguity when executing persistent commands:

Task marked RUNNING
        ↓
Command dispatched successfully
        ↓
Server crashes
        ↓
COMPLETED state was never persisted

✅ Requirements

  • Paper 26.2+
  • Java 25

LilsDeferred is developed and tested against Paper.

Other server implementations are not currently officially supported.

🌸 The Lils Plugin Collection

LilsDeferred is part of the Lils collection: a growing set of clean, lightweight Paper utilities with a focus on practical server administration, efficient implementation and maintainable code.

The goal of each project is to remain focused rather than becoming an oversized all-in-one plugin.

📜 License

LilsDeferred is open-source software licensed under the MIT License.

You are free to use, modify and redistribute the project in accordance with the terms of the license.

See the full LICENSE file for details.