Check out example codes for "bukkit register commands". It will help you in understanding the concepts better.

Code Example 1

public class main {
  public void onEnable() {
      this.getCommand("heal").setExecuter(new health(this));
      //E.g a heal command in class health
      // this.getCommand("heal").setExecture(new health(this))

      //If command in main class replace new <class>() with this.
      // this.getCommand("heal").setExecuter(this)

//If in external class a constructor has to be made.
public class health {
  private main plugin;
  //Have to create constructor in external class
  public health(main plugin) { this.plugin = plugin; }  
  public boolean onCommand(CommandSender sender, Command cmd, String Label, String[] args) { 
  	//Do stuff

Learn ReactJs, React Native from