What problem does it solve?
This Skill simplifies the creation, management, and access of configuration files for Hytale plugins, ensuring consistent and persistent settings.
Core Features & Use Cases
- Define Configuration Classes: Create custom Java classes for plugin settings using
BuilderCodec.
- Register and Load Config: Integrate configurations into your plugin using
withConfig() and ensure files are saved on startup.
- Access and Modify Settings: Retrieve and update configuration values dynamically and persist changes across server restarts.
- Use Case: You need to allow server administrators to customize game difficulty parameters like mob spawn rates and player damage multipliers. This Skill enables you to define these settings in a
ServerConfig class, register it with your plugin, and allow admins to modify a ServerConfig.json file.
Quick Start
Use the hytale-plugin-config skill to create a new configuration class named 'GameSettings' with integer fields for 'MobSpawnRate' and 'PlayerDamageMultiplier'.