OMGPIDocs

OMGPI

Source

JavaDocs

SpigotMC

Teams

Teams are usually a way to split players on groups. OMGPI provides 2 teams by default - Default (or Random, incase you have custom teams) and Spectator. Be sure players have any team, or you might have some errors!

If you want your own team, recommended to have its id as "a", "b", ...

To create your team, in the onEnable() you should use new OMGTeam, like so:

public class YourMainClass extends Game {
  OMGTeam a;
  OMGTeam b;

  public onEnable() {
    name = "YourGameDisplayName";
    super.onEnable();
    a = new OMGTeam("a", ChatColor.RED + "Team A", ChatColor.RED + "", false, GameMode.ADVENTURE);
    b = new OMGTeam("b", ChatColor.BLUE + "Team B", ChatColor.BLUE + "", false, GameMode.ADVENTURE);
    Inventories.update();
  }
}
Do not forget to update Inventories so new teams appear in menus.