mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Correctly handle road flags
This commit is contained in:
parent
b55d836871
commit
cfd432886d
@ -374,9 +374,7 @@ public abstract class PlotArea {
|
|||||||
this.spawnCustom = config.getBoolean("event.spawn.custom");
|
this.spawnCustom = config.getBoolean("event.spawn.custom");
|
||||||
this.spawnBreeding = config.getBoolean("event.spawn.breeding");
|
this.spawnBreeding = config.getBoolean("event.spawn.breeding");
|
||||||
|
|
||||||
List<String> roadflags = config.getStringList("flags.default");
|
List<String> roadflags = config.getStringList("road.flags");
|
||||||
if (roadflags.isEmpty()) {
|
|
||||||
roadflags = config.getStringList("road.flags");
|
|
||||||
if (roadflags.isEmpty()) {
|
if (roadflags.isEmpty()) {
|
||||||
roadflags = new ArrayList<>();
|
roadflags = new ArrayList<>();
|
||||||
ConfigurationSection section = config.getConfigurationSection("road.flags");
|
ConfigurationSection section = config.getConfigurationSection("road.flags");
|
||||||
@ -387,11 +385,10 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.getRoadFlagContainer().addAll(parseFlags(roadflags));
|
this.getRoadFlagContainer().addAll(parseFlags(roadflags));
|
||||||
|
|
||||||
StringBuilder roadFlagBuilder = new StringBuilder();
|
StringBuilder roadFlagBuilder = new StringBuilder();
|
||||||
Collection<PlotFlag<?, ?>> roadFlagCollection = this.getFlagContainer().getFlagMap().values();
|
Collection<PlotFlag<?, ?>> roadFlagCollection = this.getRoadFlagContainer().getFlagMap().values();
|
||||||
if (roadFlagCollection.isEmpty()) {
|
if (roadFlagCollection.isEmpty()) {
|
||||||
roadFlagBuilder.append(Captions.NONE.getTranslated());
|
roadFlagBuilder.append(Captions.NONE.getTranslated());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user