CwCommons
Shared library for CrimsonWarpedCraft Bukkit plugins. Provides reusable infrastructure for configuration loading, command registration, and persistent data storage.
Features
ConfigManager— loads and validates a YAML config file using Jackson and Jakarta Bean Validation. Any POJO that implementsConfigand declares JSR-380 constraints (e.g.@NotBlank) can be used. See Config Loading.BaseCommand— thin base class that wraps aCommandAPICommandand implements theCommandregistration interface, so every plugin command follows the same pattern. See Commands.DataStore— write-behind key-value store with namespacedRepositoryinstances. SQLite is bundled; MongoDB is supported via an optional driver. Bukkit helpers includePlayerDataManager(flushes onPlayerQuitEvent) andAutoFlushTask(periodic flush via the Bukkit scheduler). Custom Jackson serializers forLocationandItemStackare included. See the storage examples.
Documentation
- Getting Started — add cw-commons as a dependency.
- Examples — task-focused guides for config, commands, and storage.
- API Reference — full Javadoc for the latest release, hosted by JitPack. Older versions are kept too.