diff --git a/docs/apidoc/events.md b/docs/apidoc/events.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/apidoc/index.md b/docs/apidoc/index.md index 948fe1d..bd08428 100644 --- a/docs/apidoc/index.md +++ b/docs/apidoc/index.md @@ -52,4 +52,20 @@ The global object has the following properties: - `ModAPI.version: String` - The version of ModAPI. - `ModAPI.flavour: String` - - The flavour of ModAPI. Hardcoded to be `"injector"`. \ No newline at end of file + - The flavour of ModAPI. Hardcoded to be `"injector"`. + +The ModAPI object has the following methods: + - `addEventListener(eventName: String, callback: Function) : void` + - More: [EventDocumentation](events.md) + - `require(componentName: String) : void` + - Import required modules, such as `player` and `network`. + - Usage: `ModAPI.require("module")` + - `displayToChat(message: String) : void` + - Displays client-side message to user's ingame chat gui. + - Usage: `ModAPI.displayToChat("Hello World.")` + - `clickMouse() : void` + - Triggers a left click ingame. + - Usage: `ModAPI.clickMouse()` + - `rightClickMouse() : void` + - Triggers a right click ingame. + - Usage: `ModAPI.rightClickMouse()` \ No newline at end of file