DrawZone supports the creation of plugins to extend its functionality. This guide will walk you through the process of creating and integrating plugins into the DrawZone environment.
- Ensure you have Node.js and npm installed on your system.
- Clone the DrawZone repository:
git clone https://github.com/scar17off/drawzone
- Navigate to the project directory:
cd drawzone
- Install the necessary dependencies:
npm install
- Create a new directory for your plugin inside the
plugins
folder:mkdir plugins/my-plugin
- Inside your plugin directory, create an
index.js
file. This will be the entry point for your plugin.
In your index.js
file, you can define the functionality of your plugin. Here is a basic example of a plugin that greets a player when they join the game:
module.exports = {
install: function() {
server.events.on("playerJoin", client => {
client.send("Welcome to DrawZone!");
});
},
name: "Greeting plugin",
version: "1.0.0"
}