Releases: AnchorlightDev/StoneLib
Release list
StoneLib 2.2.0
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.
StoneLib 2.2.0-nightly.7
Nightly build of b3c90be6bb3bb5d591c4bb537ebd646aba702643 on master.
StoneLib 2.2.0-nightly.4
Nightly build of 4358e964e553bd3af506023c324b0358ddd536bc on master.
StoneLib 2.1.0
StoneLib 2.1.0 substantially expands the shared toolkit available to Anchorlight plugins, with new systems for events, regions, shops, displays, networking, world interactions and cross-server communication.
New
- Event clocks and scheduling. New event utilities provide start/end windows, live progress, remaining time, event-day calculations and temporary simulation controls for testing timed events.
- Population-based scaling. Shared objectives can now scale against player population while preserving progress already made. A rolling population window prevents targets unexpectedly shrinking when players log off.
- Region toolkit. New cuboid regions, chunk-indexed lookups, player enter/exit tracking and two-point selection tools make spatial systems significantly easier to build.
- Safe block operations. Plugins can fill and clear regions without blindly overwriting existing builds, including checks before world changes are made.
- Reusable shop framework. Config-driven categories, items, menus, pagination and limited stock can now be shared between plugins, while individual plugins remain responsible for their own currencies, conditions and rewards.
- Progress and display tools. Added text progress bars, global and proximity-based boss bars, configurable ARGB colours and translucent display panels.
- Item sprites in messages. Minecraft item and block icons can now be embedded directly into MiniMessage-powered chat, titles, action bars, boss bars and menus.
- HTTP and API utilities. Added asynchronous JSON requests, connection-health tracking, bounded retry queues and a request API compatible with projects migrating away from ModularEnigma Requests.
- Request/reply messaging. Cross-server transports can now correlate requests with responses using automatically expiring request IDs and timeouts.
- World and terrain helpers. Plugins can find safe terrain surfaces, valid standing positions, random locations inside the world border and evenly distributed points around an area.
- Configurable sound helpers. Play sound cues globally, for individual players, at locations or within a radius using keys loaded from configuration.
- Lightweight YAML state storage.
YamlStoreprovides schema-version checks, dirty tracking and safe persistence for plugins that do not need a full database. - Plugin file hashing.
JarHasherprovides cached SHA-256 and SHA-512 hashes for identifying installed builds and detecting changed plugin files. - Event aggregation and rate limiting. New utilities can combine high-frequency activity into reporting windows and protect operations with per-key rate limits.
- Vanish detection. Shared helpers now support vanish checks on both Paper and Velocity environments.
Improved
- ItemBuilder is much more capable. Items can now use stack amounts, list-based lore, persistent-data tags, enchantments, glint effects, unbreakable state and item flags.
- Custom items are safer to identify. Plugins can use persistent tags instead of relying on player-visible names that can be renamed or translated.
- Permission-aware commands. Players now only see tab completions for subcommands they actually have permission to use.
- Richer message placeholders. Pre-built Adventure components can be safely inserted into named placeholders, enabling structured content such as item sprites.
- More precise countdown formatting.
Durations.full()adds continuously updating formats such as2h 5m 30s. - Better menu layouts. New slot-layout utilities support pinned entries while automatically centring remaining menu items.
Compatibility
- StoneLib now runs on Java 21+. It still builds against Paper 26.2 using JDK 25, but emitted StoneLib bytecode targets Java 21.
- This resolves compatibility problems where shaded StoneLib classes could previously force consuming plugins onto Java 25 and cause
UnsupportedClassVersionErroron Java 21 servers. - The release workflow now builds and tests releases automatically, produces checksums and generates a CycloneDX software bill of materials for published builds.
StoneLib 2.1.0 is primarily additive, giving consuming plugins a much larger set of reusable building blocks without another migration comparable to the 2.0.0 package changes.
v2.0.0
✨ What's New
🗄️ Complete Storage System
StoneLib now includes a common repository system with support for:
- YAML storage
- SQLite databases
- MySQL databases
- Connection pooling through HikariCP
- Automatic database schema migrations
- Individual record reloading for multi-server environments
- Location serialization and deserialization
🌐 Cross-Server Messaging
Plugins can now communicate between Paper servers through Velocity using the new MessageBus system.
This makes it easier to synchronize caches, player data, cosmetics, settings, and other shared information across a network.
⚙️ Versioned Configuration Updates
Configuration files can now be safely upgraded between plugin versions.
StoneLib can:
- Add new configuration options
- Preserve existing values
- Preserve comments and ordering
- Rename or relocate configuration options
- Support multiple configuration files
The existing CopyResources system remains compatible but is now deprecated in favour of the new configuration system.
💬 Improved Messaging
A new MiniMessage-based messaging system provides:
- Positional placeholders
- Named placeholders
- Action bar messages
- Titles and subtitles
- Optional message entries
- Legacy colour conversion
- Plain-text conversion
Placeholder values are safely inserted without allowing unwanted MiniMessage formatting or interactions.
🛡️ Safer External and Player Text
The new UntrustedText utility protects messages containing player input or data received from external services.
Potentially dangerous formatting characters are neutralized before the text is displayed.
🎮 Command Framework
The new command router makes it easier for plugins to build structured commands with:
- Subcommands
- Permissions
- Tab completion
- Centralized command routing
🖥️ Menu Framework
StoneLib now includes reusable inventory menu handling with:
- Typed menu contexts
- Centralized click handling
- Automatic interaction blocking
- Safer inventory behaviour
📝 Native Paper Dialogs
Plugins can now create modern Paper dialogs with:
- Text fields
- Sliders
- Toggles
- Dropdowns
- Submit actions
- Cancel actions
- Validated responses
🪧 Native Holograms
StoneLib can now create and manage holograms using Paper's native TextDisplay entities without requiring an external hologram plugin.
🎁 Configurable Loot Tables
Plugins can build weighted loot and reward systems directly from configuration files, including:
- Weighted items
- Minimum and maximum quantities
- Enchantments
- Multiple rolls
- Safe handling of invalid entries
⏱️ Cooldowns and Scheduling
New shared utilities provide:
- Player and action cooldowns
- Optional cooldown bypass permissions
- Sync and async tasks
- Delayed and repeating tasks
- Automatic task tracking and cleanup
- Async work with main-thread callbacks
🔐 LuckPerms Integration
The new permission service provides:
- Permission lookups
- Cached permission checks
- Temporary permission grants
- Automatic expiry
- Permission revocation
🎨 Shared Rendering
StoneLib now includes an asynchronous rendering system designed for effects and other frequently updated visual elements.
Multiple renderables can share one render loop with built-in viewer distance culling, reducing the need for individual repeating tasks.
⏰ Duration Utilities
Durations can now be consistently displayed in:
- Clock format
- Human-readable format
- Compact format
🔧 Platform Modernization
StoneLib has been updated for the current Paper platform and now targets:
- Paper 26.2
- Java 25
The project has also moved from the old org.modularsoft.StoneLib package structure to:
dev.anchorlight.stonelib
⚠️ Breaking Changes
StoneLib 2.0.0 is a major-version release and existing integrations will require updating.
- Java 25 is now required.
- The library now targets Paper 26.2.
- Java package names have moved to
dev.anchorlight.stonelib. - The Maven project group has moved from
org.modularsofttodev.anchorlight. CopyResourcesis deprecated in favour ofConfigUpdater.
Existing ItemBuilder and ConfigValidator functionality remains available under the new package structure.
Version 1.1
Merge pull request #1 from ModularSoftAU/staging Additional common validators for yaml