mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
26 lines
867 B
Plaintext
26 lines
867 B
Plaintext
package pumpkin:plugin;
|
|
|
|
world plugin {
|
|
use context.{context};
|
|
use event.{event};
|
|
use server.{server as server-instance};
|
|
use command.{command-sender, consumed-args, command-error};
|
|
|
|
// This is what the host should provide to the plugin
|
|
import logging;
|
|
import server;
|
|
import text;
|
|
import command;
|
|
import context;
|
|
import i18n;
|
|
|
|
// This is what the plugin should provide
|
|
export init-plugin: func();
|
|
export on-load: func(context: context) -> result<_, string>;
|
|
export on-unload: func(context: context) -> result<_, string>;
|
|
export metadata;
|
|
export common;
|
|
export handle-event: func(event-id: u32, server: server-instance, event: event) -> event;
|
|
export handle-command: func(command-id: u32, sender: command-sender, server: server-instance, args: consumed-args) -> result<s32, command-error>;
|
|
}
|