| title | API reference |
|---|---|
| nav_order | 5 |
| has_children | true |
| permalink | /api/ |
Everything the runtime binds into your scripts. All of it is available as a global, with no import.
| Article | Covers |
|---|---|
| Script | Script.loadClass, unload callbacks, runtime libraries, profiling hooks |
$ magic imports |
The shorthand Java class resolver |
| Modules: import and export | Sharing code between scripts, path resolution, reload cascades |
| Bukkit | The Bukkit server global and the platform helpers around it |
| Article | Covers |
|---|---|
| Commands | registerCommand, tab completion, aliases, middleware |
| Event listeners | registerListener and event priorities |
| Scheduler | Sync and async tasks, timers, cancellation |
| Concurrency model | What runs on which thread, and why loading blocks |
| Article | Covers |
|---|---|
| Database | The Sql module, queries and transactions |
| HTTP fetch | Calling external APIs |
| Console logging | log, warn, error |
| JSON | Parsing and serializing |
| Shared state and messaging | StaticStorage, GlobalMap, GlobalNotification, DataFile |
| Implementing Java interfaces | Handing a JavaScript implementation back to a Java plugin |
If you only read two articles here, make them Modules and the concurrency model. Between them they account for most of the bugs people hit in their first month.