Dev AddOn

From MBedwars
Jump to navigation Jump to search

! Legacy Warning !

You are currently visiting a prehistoric website of the Marcely's Bedwars plugin for v4 and older.

In 2021, we released version 5 and completely overhauled the wiki. A lot of information that you find here likely won't be up-to-date anymore. You may find the updated wiki on: https://wiki.mbedwars.com

Creating yourself a MBedwars Add-On isn't that hard as you thing.
But first of all make sure that your plugin.yml is depending MBedwars.
Example:

name: MyFirstMBedwarsAddon
version: 1.0
main: com.me.MyFirstMBedwarsAddon.Main
depend: [MBedwars]

After that is done create a new de.marcely.bedwars.api.BedwarsAddon object.
Example of a Main class:

package com.me.MyFirstMBedwarsAddon.Main;

import org.bukkit.plugin.java.JavaPlugin;
import de.marcely.bedwars.api.BedwarsAddon;

public class Main extends JavaPlugin {
   public BedwarsAddon bedwarsAddon = new BedwarsAddon(this);
}

You can skip the creation of this object if you don't want to create commands or a config file.
Here're the documented things you can do with this object: