mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
fix: Flag list parsing for console players (#3277)
Instead of recreating the logic, we can simply reuse what we created above and string-ify that for parsing.
This commit is contained in:
parent
cb596ee6ea
commit
b022a97196
@ -408,13 +408,9 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getFlagContainer().addAll(parseFlags(flags));
|
this.getFlagContainer().addAll(parseFlags(flags));
|
||||||
|
|
||||||
Component flagsComponent = null;
|
|
||||||
Collection<PlotFlag<?, ?>> flagCollection = this.getFlagContainer().getFlagMap().values();
|
|
||||||
flagsComponent = getFlagsComponent(flagsComponent, flagCollection);
|
|
||||||
ConsolePlayer.getConsole().sendMessage(
|
ConsolePlayer.getConsole().sendMessage(
|
||||||
TranslatableCaption.of("flags.area_flags"),
|
TranslatableCaption.of("flags.area_flags"),
|
||||||
Template.of("flags", flagsComponent)
|
Template.of("flags", flags.toString())
|
||||||
);
|
);
|
||||||
|
|
||||||
this.spawnEggs = config.getBoolean("event.spawn.egg");
|
this.spawnEggs = config.getBoolean("event.spawn.egg");
|
||||||
@ -433,13 +429,9 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getRoadFlagContainer().addAll(parseFlags(roadflags));
|
this.getRoadFlagContainer().addAll(parseFlags(roadflags));
|
||||||
|
|
||||||
Component roadFlagsComponent = null;
|
|
||||||
Collection<PlotFlag<?, ?>> roadFlagCollection = this.getRoadFlagContainer().getFlagMap().values();
|
|
||||||
roadFlagsComponent = getFlagsComponent(roadFlagsComponent, roadFlagCollection);
|
|
||||||
ConsolePlayer.getConsole().sendMessage(
|
ConsolePlayer.getConsole().sendMessage(
|
||||||
TranslatableCaption.of("flags.road_flags"),
|
TranslatableCaption.of("flags.road_flags"),
|
||||||
Template.of("flags", roadFlagsComponent)
|
Template.of("flags", roadflags.toString())
|
||||||
);
|
);
|
||||||
|
|
||||||
loadConfiguration(config);
|
loadConfiguration(config);
|
||||||
|
Loading…
Reference in New Issue
Block a user