Fandom

McMMO Wiki

API

55pages on
this wiki
Add New Page
Talk0 Share

The mcMMO API is a new utility to mcMMO. It is used with the new events system, to make it easy.


The basic syntax goes like this:


package packagename;
import com.gmail.nossr50.events.McMMOPlayerLevelUpEvent;

public class MyListener implements Listener {

@EventHandler
  public void onPlayerLevelUp(McMMOPlayerLevelUpEvent event) {
      Player player = event.getPlayer();
      SkillType skill = event.getSkill();
  }


}

That would be your Listener class. Now, you just add this line into your public void onEnable():

Bukkit.getServer().getPluginManager().registerEvents(new MyListener(this), this);

From there you can extend and add more features. :D

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki