What this plugin does
Schema Validator validates JSON or YAML data files against schema files and exposes the result through two entry points:
- the public Java/Bukkit API (
SchemaValidatorAPI) - the optional Skript integration
- the administrative command interface (
/schemavalidator)
At runtime, the common flow is:
- A schema is loaded and parsed (
FileSchemaLoader). - Validation dispatches by schema type (
ValidatorDispatcher). ValidationServicereturns aValidationResult.- If the request came from Skript, the latest result is also stored in
SkriptValidationBridge.
Runtime building blocks
SchemaValidatorPlugin: plugin lifecycle and startup wiring.PluginConfig: readsconfig.ymland exposes options.SchemaRegistry: in-memory schema registry with optional cache expiration.ValidationService: facade that runs validators and returnsValidationResult.SchemaValidatorAPI: public Java/Bukkit integration facade.EffValidateDataandExprLastValidationErrors: optional Skript-facing API.SchemaValidatorCommand: administrative command handler.
Prerequisites
- Java 21 runtime.
- Paper server.
- Skript installed only if you want the Skript syntax.
- Write access to
plugins/Schema-Validator/.
[!NOTE] In the current Skript effect path, data is loaded as
Map<String, Object>. That means root arrays and root primitive payloads are not supported through this effect.
Core terms
Schema type dispatch
The validator used depends on schema type:
object->ObjectValidatorarray->ArrayValidator- primitive types (
string,number,integer,boolean,null,any) ->PrimitiveValidator
Error path
Every error includes a path, for example $.player.inventory[2].material.
Strict mode
strict-mode controls unsupported keyword handling during schema loading:
false: log warning and continue.true: throw an exception and fail load.
What to do next
- Deploy safely with Installation.
- Run your first end-to-end validation in Quickstart.
- Tune behavior in Configuration.
- Integrate from another plugin through Java API.
- Inspect runtime state through Commands.