StoneLib 2.2.0 brings native Bedrock forms, Folia-ready scheduling and a set of new gameplay modules, and fixes memory leaks in the scheduler, cooldowns and dialogs that could eventually exhaust memory on busy servers.
New
- Bedrock forms. Bedrock players now automatically receive the equivalent native form for every
FormDialog.BedrockFormssends modal, button-list and custom forms through Floodgate when it is installed, and does nothing when it isn't, so servers without Floodgate never load its classes.FormDialog.prompt()builds button dialogs. - Paper and Folia scheduling.
PlatformSchedulerprovides entity, region, global and async scheduling on Paper's regionised schedulers, so one code path serves both Paper and Folia. - Safer versioned configs.
VersionedConfigchecks that the server's file parses before migrating it. A file that fails to parse is never overwritten: the error is logged with its position and the bundled defaults are used until a reload finds it fixed. Comments surviveset(). - Combat tags.
CombatTagServicetracks which players are in combat, with enter and leave listeners. - Block ownership.
BlockOwnership,ExpiringOwnersandBlockPositionstrack who owns blocks, with expiry and a true nearest-owner search. - Invites.
InviteRegistrymanages expiring invitations with anti-spam rules. - Debounced file writes.
DebouncedFileWritercoalesces writes and saves them atomically off the main thread. - Update checks.
UpdateCheckerandVersionscheck GitHub releases asynchronously. - Clickable buttons.
Buttonsbuilds components that run or suggest a command when clicked.
Improved
MessageServicecan read messages from a section of another file, accepts older%name%placeholders, and exposes the prefix.CommandRouterhas configurable feedback for its own replies, anonNoArgumentshandler and player-only sub-commands (SubCommand.playerOnly()). Tab completion never returns null.ConfigUpdatertreats a config file with noconfig-versionas version 1, so later migrations still apply to it, and writes the version as a number instead of the string'2'.
Fixed
- Scheduler memory leak.
SchedulerServicekept every task it scheduled untilcancelAll(), so finished tasks and everything they captured stayed in memory for the life of the plugin. On a busy server this could end inOutOfMemoryError. Finished tasks are now released, andsupplyAsyncskips its callback if the plugin was disabled in the meantime. - Cooldown buildup.
CooldownServicenow sweeps expired entries, so players who never return don't accumulate. - Dialog callbacks.
FormDialogcallbacks now expire after 30 minutes instead of Paper's 12-hour default, so unclicked buttons no longer hold on to what they captured. - Closing Bedrock forms. Closing a Bedrock form now runs the dialog's exit handler, matching Escape on Java. GUIs that reopen from the exit handler previously stayed closed for Bedrock players.