mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-26 01:51:19 +01:00
parent
d33be37694
commit
1224d3b443
@ -25,6 +25,7 @@
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.sk89q.util.yaml.YAMLFormat;
|
||||
import com.sk89q.util.yaml.YAMLProcessor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -101,7 +102,7 @@ public void load() {
|
||||
plugin.createDefaultConfiguration(
|
||||
new File(plugin.getDataFolder(), "config.yml"), "config.yml");
|
||||
|
||||
YAMLProcessor config = new YAMLProcessor(new File(plugin.getDataFolder(), "config.yml"), true);
|
||||
YAMLProcessor config = new YAMLProcessor(new File(plugin.getDataFolder(), "config.yml"), true, YAMLFormat.EXTENDED);
|
||||
try {
|
||||
config.load();
|
||||
} catch (IOException ignore) {}
|
||||
@ -114,6 +115,8 @@ public void load() {
|
||||
"auto-invincible", config.getBoolean("auto-invincible-permission", true));
|
||||
usePlayerMove = config.getBoolean(
|
||||
"use-player-move-event", true);
|
||||
|
||||
config.setWriteDefaults(false);
|
||||
|
||||
// Load configurations for each world
|
||||
for (World world : plugin.getServer().getWorlds()) {
|
||||
|
@ -31,6 +31,7 @@
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sk89q.util.yaml.YAMLFormat;
|
||||
import com.sk89q.util.yaml.YAMLProcessor;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.CreatureType;
|
||||
@ -167,12 +168,12 @@ public WorldConfiguration(WorldGuardPlugin plugin, String worldName) {
|
||||
|
||||
this.plugin = plugin;
|
||||
this.worldName = worldName;
|
||||
this.parentConfig = new YAMLProcessor(new File(plugin.getDataFolder(), "config.yml"), false);
|
||||
this.parentConfig = new YAMLProcessor(new File(plugin.getDataFolder(), "config.yml"), false, YAMLFormat.EXTENDED);
|
||||
|
||||
plugin.createDefaultConfiguration(configFile, "config_world.yml");
|
||||
plugin.createDefaultConfiguration(blacklistFile, "blacklist.txt");
|
||||
|
||||
config = new YAMLProcessor(this.configFile, true);
|
||||
config = new YAMLProcessor(this.configFile, true, YAMLFormat.EXTENDED);
|
||||
loadConfiguration();
|
||||
|
||||
logger.info("WorldGuard: Loaded configuration for world '" + worldName + '"');
|
||||
|
Loading…
Reference in New Issue
Block a user