forked from Pumpkin-MC/Pumpkin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.wit
More file actions
24 lines (21 loc) · 850 Bytes
/
Copy pathplugin.wit
File metadata and controls
24 lines (21 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
// 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>;
}