Skip to content

Releases: AnchorlightDev/StoneLib

StoneLib 2.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 07:03
b3c90be

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. BedrockForms sends 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. PlatformScheduler provides entity, region, global and async scheduling on Paper's regionised schedulers, so one code path serves both Paper and Folia.
  • Safer versioned configs. VersionedConfig checks 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 survive set().
  • Combat tags. CombatTagService tracks which players are in combat, with enter and leave listeners.
  • Block ownership. BlockOwnership, ExpiringOwners and BlockPositions track who owns blocks, with expiry and a true nearest-owner search.
  • Invites. InviteRegistry manages expiring invitations with anti-spam rules.
  • Debounced file writes. DebouncedFileWriter coalesces writes and saves them atomically off the main thread.
  • Update checks. UpdateChecker and Versions check GitHub releases asynchronously.
  • Clickable buttons. Buttons builds components that run or suggest a command when clicked.

Improved

  • MessageService can read messages from a section of another file, accepts older %name% placeholders, and exposes the prefix.
  • CommandRouter has configurable feedback for its own replies, an onNoArguments handler and player-only sub-commands (SubCommand.playerOnly()). Tab completion never returns null.
  • ConfigUpdater treats a config file with no config-version as 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. SchedulerService kept every task it scheduled until cancelAll(), so finished tasks and everything they captured stayed in memory for the life of the plugin. On a busy server this could end in OutOfMemoryError. Finished tasks are now released, and supplyAsync skips its callback if the plugin was disabled in the meantime.
  • Cooldown buildup. CooldownService now sweeps expired entries, so players who never return don't accumulate.
  • Dialog callbacks. FormDialog callbacks 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

Pre-release

Choose a tag to compare

@github-actions github-actions released this 29 Sep 07:02
b3c90be

Nightly build of b3c90be6bb3bb5d591c4bb537ebd646aba702643 on master.

StoneLib 2.2.0-nightly.4

Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Sep 00:11
4358e96

Nightly build of 4358e964e553bd3af506023c324b0358ddd536bc on master.

StoneLib 2.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 00:03
2440ae1

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. YamlStore provides schema-version checks, dirty tracking and safe persistence for plugins that do not need a full database.
  • Plugin file hashing. JarHasher provides 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 as 2h 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 UnsupportedClassVersionError on 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

Choose a tag to compare

@benrobson benrobson released this 11 Sep 10:39
fcf34e0

✨ 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.modularsoft to dev.anchorlight.
  • CopyResources is deprecated in favour of ConfigUpdater.

Existing ItemBuilder and ConfigValidator functionality remains available under the new package structure.

Version 1.1

Choose a tag to compare

@palsmo palsmo released this 08 Jan 15:31
6935da8
Merge pull request #1 from ModularSoftAU/staging

Additional common validators for yaml

Version 1.0

Choose a tag to compare

@palsmo palsmo released this 06 Jan 21:39
0829a5f
update