Dev Commands

From MBedwars
Revision as of 16:12, 9 November 2016 by Marcely1199 (talk | contribs) (Created page with "First of all, make sure that you have the BedwarsAddon object.<br /> Click Dev_AddOn to get to the documentation for that.<br /> Adding commands isn't much harder than cre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

First of all, make sure that you have the BedwarsAddon object.
Click Dev_AddOn to get to the documentation for that.
Adding commands isn't much harder than creating the BedwarsAddon.
Simply create a new BedwarsAddonCommand (Example:

BedwarsAddonCommand cmd = new BedwarsAddonCommand("testcommand" /* command */, "<arg1> [arg2] [arg3]" /* usage */){
  public void onWrite(String[] args){
     // do something
  }
};

) And register the command using the registerCommand method in the BedwarsAddon command (Example:

bedwarsAddon.registerCommand(cmd);

).