mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixed issue with default flags not being parsed when added
This commit is contained in:
parent
61ebd2a144
commit
073b0b612c
@ -936,4 +936,8 @@ public class PlotSquared {
|
||||
public static Set<String> getPlotWorlds() {
|
||||
return plotworlds.keySet();
|
||||
}
|
||||
|
||||
public static Collection<PlotWorld> getPlotWorldObjects() {
|
||||
return plotworlds.values();
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,13 @@ public class FlagManager {
|
||||
*/
|
||||
public static boolean addFlag(final AbstractFlag af) {
|
||||
PlotSquared.log(C.PREFIX.s() + "&8 - Adding flag: &7" + af);
|
||||
af.getKey();
|
||||
for (PlotWorld plotworld : PlotSquared.getPlotWorldObjects()) {
|
||||
for (final Flag flag : plotworld.DEFAULT_FLAGS) {
|
||||
if (flag.getAbstractFlag().getKey().equals(af.getKey())) {
|
||||
flag.setKey(af);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PlotSquared.getAllPlotsRaw() != null) {
|
||||
for (final Plot plot : PlotSquared.getPlots()) {
|
||||
for (final Flag flag : plot.settings.flags) {
|
||||
|
Loading…
Reference in New Issue
Block a user