@Override public YamlConfigurationOptions copyDefaults(boolean value) { super.copyDefaults(value); return this; }
@Override public YamlConfigurationOptions copyDefaults(boolean value) { super.copyDefaults(value); return this; }
private void addDefaults() { conf.options().copyDefaults(true); saveConfig(); }
/** * Saves the {@link FileConfiguration} object. * {@code config.options().copyDefaults(true)} is called before saving the * config. */ public void save() { try { this.config.options().copyDefaults(true); this.config.save(this.file); } catch (final Exception e) { e.printStackTrace(); } } }
public BukkitConfigHandler(Plugin plugin) { this.config = plugin.getConfig(); if (!(new File("plugins/CouponCodes/config.yml").exists())) plugin.saveDefaultConfig(); if (!config.options().copyDefaults(true).configuration().equals(config)) plugin.saveConfig(); }
@Override protected void load0() throws IOException { config = NeverLag.getInstance().getConfig(); config.options().copyDefaults(true); }
public PluginHookManager() { File hookConfigFile = new File(MyPetApi.getPlugin().getDataFolder().getPath() + File.separator + "hooks-config.yml"); config = new ConfigurationYAML(hookConfigFile); config.getConfig().options().copyDefaults(true); }
public void onEnable() { plugin = this; getConfig().options().copyDefaults(true); saveConfig(); CLUpdate clUpdate = new CLUpdate(this); Server server = getServer(); ConsoleCommandSender console = server.getConsoleSender(); nmsver = Bukkit.getServer().getClass().getPackage().getName(); nmsver = nmsver.substring(nmsver.lastIndexOf(".") + 1); if (nmsver.equalsIgnoreCase("v1_8_R1") || nmsver.startsWith("v1_7_")) { // Not sure if 1_7 works for the protocol hack? useOldMethods = true; } console.sendMessage(ChatColor.AQUA + getDescription().getName() + " V" + getDescription().getVersion() + " has been enabled!"); Bukkit.getPluginManager().registerEvents(clUpdate, this); }
@Override public void onEnable() { getConfig().options().copyDefaults(true); saveConfig(); getServer().getPluginManager().registerEvents(new ChatListener(), this); } }
this.multiverseConfig.options().copyDefaults(false); this.multiverseConfig.options().copyHeader(true);
private void addConfigDefaults() { config.options().copyDefaults(true); config.addDefault("prefix", "&6[&bTimo&fCloud&6]"); config.addDefault("defaultMapName", "Village"); config.addDefault("MotdToState.§aOnline", "ONLINE"); config.addDefault("PlayersToState.enabledWhileStates", Arrays.asList("WAITING", "LOBBY")); config.addDefault("PlayersToState.percentages.100,0", "FULL"); config.addDefault("PlayersToState.percentages.50,0", "HALF_FULL"); TimoCloudBukkit.getInstance().setPrefix(config.getString("prefix")); try { config.save(configFile); } catch (Exception e) { TimoCloudBukkit.getInstance().severe(e); } }
getConfig().options().copyDefaults(true); saveConfig();
BedwarsRel.getInstance().getConfig().options().copyDefaults(true); BedwarsRel.getInstance().getConfig().options().copyHeader(true); BedwarsRel.getInstance().getConfig().options().copyDefaults(true); BedwarsRel.getInstance().getConfig().options().copyHeader(true);
BedwarsRel.getInstance().getConfig().options().copyDefaults(true); BedwarsRel.getInstance().getConfig().options().copyHeader(true); BedwarsRel.getInstance().getConfig().options().copyDefaults(true); BedwarsRel.getInstance().getConfig().options().copyHeader(true);
getConfig().options().copyDefaults(true); saveConfig();
public void onEnable() { getConfig().options().copyDefaults(true); saveConfig();
this.loadConfigInUTF(); this.getConfig().options().copyDefaults(true); this.getConfig().options().copyHeader(true);
this.loadConfigInUTF(); this.getConfig().options().copyDefaults(true); this.getConfig().options().copyHeader(true);
private void addSignTemplatesDefaults() { signTemplates.options().copyDefaults(true);
config.options().copyDefaults(true); config.load(main); } catch (Exception e) { config.options().copyDefaults(true);