Exemplo n.º 1
0
  /** Gets the selected world. */
  public void selectWorld(int par1) {
    mc.displayGuiScreen(null);

    if (selected) {
      return;
    }

    selected = true;
    int i = ((SaveFormatComparator) saveList.get(par1)).getGameType();

    if (i == 0) {
      mc.playerController = new PlayerControllerSP(mc);
    } else {
      mc.playerController = new PlayerControllerCreative(mc);
    }

    String s = getSaveFileName(par1);

    if (s == null) {
      s = (new StringBuilder()).append("World").append(par1).toString();
    }

    // ====================
    // START MODOPTIONSAPI
    // ====================
    ModOptionsAPI.selectedWorld(getSaveName(par1));
    // ====================
    // END MODOPTIONSAPI
    // ====================
    mc.startWorld(s, getSaveName(par1), null);
    mc.displayGuiScreen(null);
  }
Exemplo n.º 2
0
 public static void setup() {
   captionOptions = ModOptionsAPI.addMod("captionapi", "Caption API").setClientMode();
   ModOptionBoolean option =
       (ModOptionBoolean)
           captionOptions
               .addBooleanOption(
                   "Captioning", CaptionAPI.getCaption("button.text"), CaptionAPI.getCaptioning())
               .setCallback(instance);
   option.setLabels(CaptionAPI.getCaption("button.on"), CaptionAPI.getCaption("button.off"));
 }