From a1bfc1cb2657b686b44f1df8c32c60bc8fe5f19a Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 11 Oct 2020 19:24:50 +0100 Subject: [PATCH] correctly handle road flags --- .../com/plotsquared/core/plot/PlotArea.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java index 93545c0b6..69c4d2d53 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java @@ -388,17 +388,14 @@ public abstract class PlotArea { this.spawnCustom = config.getBoolean("event.spawn.custom"); this.spawnBreeding = config.getBoolean("event.spawn.breeding"); - List roadflags = config.getStringList("flags.default"); + List roadflags = config.getStringList("road.flags"); if (roadflags.isEmpty()) { - roadflags = config.getStringList("road.flags"); - if (roadflags.isEmpty()) { - roadflags = new ArrayList<>(); - ConfigurationSection section = config.getConfigurationSection("road.flags"); - Set keys = section.getKeys(false); - for (String key : keys) { - if (!"default".equals(key)) { - roadflags.add(key + ';' + section.get(key)); - } + roadflags = new ArrayList<>(); + ConfigurationSection section = config.getConfigurationSection("road.flags"); + Set keys = section.getKeys(false); + for (String key : keys) { + if (!"default".equals(key)) { + roadflags.add(key + ';' + section.get(key)); } } }