moapi
Class ModOptionsAPI

java.lang.Object
  extended by moapi.ModOptionsAPI

public class ModOptionsAPI
extends java.lang.Object

Controller class for the API.


Constructor Summary
ModOptionsAPI()
           
 
Method Summary
static void addMod(ModOptions o)
          Adds a mods set of options to a menu in the ModOptions menu.
static ModOptions addMod(java.lang.String name)
          Adds a mod by name and attempts to load it
static ModOptions[] getAllMods()
          Gets all mods that have been added
static ModOptions getModOptions(java.lang.String name)
          Returns a set of options for a mod by the name of the mod.
static ModOptions[] getMultiplayerMods()
          Returns all mods that identify as a multiplayer mod
static ModOptions[] getSingleplayerMods()
          Returns all mods that identify as a singleplayer mod
static boolean isMultiplayerWorld()
          Check if the world is a multiplayer world
static void joinedMultiplayerWorld(java.lang.String s)
          Set that we are in a multiplayer world
static void selectedWorld(java.lang.String s)
          Set that we are in a singleplayer world
static void viewingMainMenu()
          Set that we are in the main menu
static boolean worldLoaded()
          Check if we are ingame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModOptionsAPI

public ModOptionsAPI()
Method Detail

worldLoaded

public static boolean worldLoaded()
Check if we are ingame

Returns:
true if we are ingame

isMultiplayerWorld

public static boolean isMultiplayerWorld()
Check if the world is a multiplayer world

Returns:
True if multiplayer world

joinedMultiplayerWorld

public static void joinedMultiplayerWorld(java.lang.String s)
Set that we are in a multiplayer world

Parameters:
s - Server name

selectedWorld

public static void selectedWorld(java.lang.String s)
Set that we are in a singleplayer world

Parameters:
s - World name

viewingMainMenu

public static void viewingMainMenu()
Set that we are in the main menu


getAllMods

public static ModOptions[] getAllMods()
Gets all mods that have been added

Returns:
Array of all sets of options for all mods
Since:
0.1

getMultiplayerMods

public static ModOptions[] getMultiplayerMods()
Returns all mods that identify as a multiplayer mod

Returns:
Array of all sets of options for multiplayer world mods

getSingleplayerMods

public static ModOptions[] getSingleplayerMods()
Returns all mods that identify as a singleplayer mod

Returns:
Array of all sets of options for singleplayer world mods

getModOptions

public static ModOptions getModOptions(java.lang.String name)
Returns a set of options for a mod by the name of the mod.

Parameters:
name - Name of the mod
Returns:
Set of options for the mod named in the parameters
Since:
0.1

addMod

public static void addMod(ModOptions o)
Adds a mods set of options to a menu in the ModOptions menu. (Add your mod's options here)

Parameters:
o - A set of options for a mod
Since:
0.1

addMod

public static ModOptions addMod(java.lang.String name)
                         throws MOMissingModException
Adds a mod by name and attempts to load it

Parameters:
name - name of mod being loaded
Returns:
Mod object
Throws:
MOMissingModException