Dependency Management
Declare plugin dependencies in plugin.yml. Endstone's resolver decides the load order.
name: economy
version: 1.0.0
main: dev.example.economy.EconomyPlugin
depend:
- core_plugin
softdepend:
- permissions
loadbefore: [minigames]
imports: [core_plugin]
exports: [dev.example.economy.api]
libraries: [database-driver-1.0.jar]Rules
- A missing required dependency or a hard cycle rejects the plugin with a diagnostic. Independent plugins keep running.
- Soft cycles are resolved deterministically.
- Disabling a provider first disables plugins that hard-depend on it.
- Versions are opaque strings. Ranges such as
>=1.0and Maven coordinates are not valid dependency entries.
Class loading
Each plugin has its own class loader. Classes are resolved in this order:
- Protected JDK, Zernyth API and runtime packages, from the parent.
- The plugin's JAR and its declared local libraries.
- Packages exported by a provider and explicitly imported.
- Other JDK platform classes.
Plugins cannot bring classes in the packages java, javax, jdk, sun, com.sun, dev.zernyth.api or dev.zernyth.runtime.
An import must also be declared as a hard or soft dependency. If an optional provider is missing, its import is skipped, and your code must handle the missing type.