Beispiel #1
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"));
 }
Beispiel #2
0
 public void onChange(ModOption option) {
   CaptionAPI.setCaptioning(((ModOptionBoolean) option).getValue());
   mod_CaptionAPI.saveOptions();
 }