Esempio n. 1
0
 @Override
 public void load() {
   try {
     super.load();
     if (!getNode("channels").isAttached()) {
       getNode("channels.spout.format").setValue("[{{DARK_CYAN}}spout{{WHITE}}] {MESSAGE}");
       getNode("channels.spout.invite-only").setValue(false);
       getNode("channels.spout.password").setValue("unleashtheflow");
       getNode("channels.spout.join-message").setValue("{{BRIGHT_GREEN}}You have joined Spout.");
       getNode("channels.spout.leave-message").setValue("{{RED}}You have left Spout.");
       getNode("channels.spout.ban-message")
           .setValue("{{RED}}You have been {{BOLD}}banned{{RESET}}{{RED}} from Spout!");
       getNode("channels.spout.listeners")
           .setValue(Arrays.asList("Wulfspider", "Afforess", "alta189", "Top_Cat"));
       getNode("channels.spout.irc.enabled").setValue(false);
       getNode("channels.spout.irc.bot").setValue("ChatterBot");
       save();
     }
     for (String name : getNode("channels").getKeys(false)) {
       load(name);
     }
   } catch (ConfigurationException e) {
     e.printStackTrace();
   }
 }
Esempio n. 2
0
 @Override
 public void save() {
   try {
     super.save();
   } catch (ConfigurationException e) {
     e.printStackTrace();
   }
 }
Esempio n. 3
0
 public static void save(Configuration config) {
   final AnnotatedObjectConfiguration biomes = new AnnotatedObjectConfiguration(config);
   for (Entry<String, VanillaBiome> entry : BY_NAME.entrySet()) {
     biomes.addObject(entry.getValue(), entry.getKey());
   }
   try {
     biomes.save();
   } catch (ConfigurationException ex) {
     ex.printStackTrace();
   }
 }