File Details
ServerVariables.jar
- R
- Jan 15, 2026
- 5.08 MB
- 109
- Early Access
File Name
ServerVariables.jar
Supported Versions
- Early Access
Changelog
All notable changes to ServerVariables will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2026-01-15
Added
YAML Variable Configuration System: Variables can now be defined in YAML files within
plugins/DonKolia_ServerVariables/variables/- Support for multiple YAML files to organize variables by category
- Automatic loading and validation of variable definitions
- Hot-reload capability with
/svar reloadcommand
Variable Type System: Three data types supported
INTEGER- Whole numbers with min/max validationDOUBLE- Decimal numbers with min/max validationTEXT- String values with character limit validation
Configurable Limitations:
max_valueandmin_valuefor numeric variablesmax_charactersfor text variablesmanage_out_of_rangeoption to auto-adjust or reject out-of-range values
Automatic Initial Values:
- Numeric variables default to
min_value - Text variables default to empty string
- Numeric variables default to
Complete Command Set:
/svar set <variable> <value> <player> [silent:true]- Set variable value/svar get <variable> <player>- Get variable value/svar add <variable> <value> <player> [silent:true]- Add to numeric variable/svar reduce <variable> <value> <player> [silent:true]- Subtract from numeric variable/svar reset <variable> <player> [silent:true]- Reset to initial value/svar reload- Reload configuration and variables
Silent Mode: All modification commands support
silent:trueparameter to suppress confirmation messagesMySQL Persistent Storage:
- Automatic table creation on first run
- Stores player UUID, name, variable key, and value
- Composite primary key on (uuid, var_key)
Public API for Developers:
ServerVariablesAPI.setVariable()- Set variable programmaticallyServerVariablesAPI.getVariable()- Get variable with optional default value- Full validation and limitation enforcement through API
Example Configuration Files:
variables_numerales.yml- Example numeric variables (gold, level, experience, skill points, reputation)variables_tipo_texto.yml- Example text variables (rank, title, clan, prefix, suffix)
Validation System:
- Type checking for all variable assignments
- Range validation for numeric values
- Character limit enforcement for text values
- Descriptive error messages for validation failures
VariablesManager: Centralized variable definition management
- Loads all YAML files from variables directory
- Validates variable configurations on load
- Provides variable metadata to commands and API
- Console logging for successful variable loading
Fixed
- Variable Recognition in Commands: Fixed issue where variables defined in YAML were not being recognized by
/svar setcommand - VariablesManager Initialization: Ensured proper initialization and variable loading on plugin startup
- Console Feedback: Added detailed console output for variable loading to aid debugging
Changed
- API Enhancement:
setVariable()now requires player name parameter to keepplayer_namecolumn updated - Configuration Structure: Moved from single config file to organized YAML-based system
Technical Details
- Java Version: Requires Java 21
- Build System: Gradle with Shadow plugin
- Database: MySQL/MariaDB compatible
- Hytale Compatibility: Built for Hytale modding API
Future Roadmap
Planned Features
- Variable groups and categories
- Permission-based variable access control
- Variable change events for other plugins
- Bulk operations for multiple variables
- Import/export functionality
- Web dashboard for variable management
Author: DonKolia
License: Created for Hytale

