Add mod validation for annotations: schemas, migrations, configuration bounds, listener methods, and commands.
This commit is contained in:
1 parent
9af951b4be
commit
c79a90b88f
10 files changed
+389
-18
No files matched your search
@@ -485,6 +485,13 @@ mod and its libraries. The server does not start when a mod
|
||||
3. uses ZomboidForge classes outside the API, or
|
||||
4. contains classes in a ZomboidForge package, or a class with the name of a game class.
|
||||
|
||||
While it loads a mod, the server also checks the annotations: the entry point's listener and
|
||||
scheduled methods, `@Schema`/`@Migrate`/`@Key`/`@Min`/`@Max` on records, and the
|
||||
`@RegisterCommand` classes. `checkMod` runs the same rules on the built jar (records only when
|
||||
they carry one of these annotations), loading the classes without running any of their code.
|
||||
Objects passed to `events().register(...)` are only checked on the server, when they are
|
||||
registered.
|
||||
|
||||
Every problem of every mod is listed in the log.
|
||||
|
||||
## What a mod can see
|
||||
|
||||
Reference in new issue
Block a user