From b022a97196880e873bb6e4d49a0e24179ba58523 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 18 Oct 2021 20:20:52 +0200 Subject: [PATCH] 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. --- .../java/com/plotsquared/core/plot/PlotArea.java | 12 ++---------- 1 file changed, 2 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 c0ec98bd5..38561958c 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotArea.java @@ -408,13 +408,9 @@ public abstract class PlotArea { } } this.getFlagContainer().addAll(parseFlags(flags)); - - Component flagsComponent = null; - Collection> flagCollection = this.getFlagContainer().getFlagMap().values(); - flagsComponent = getFlagsComponent(flagsComponent, flagCollection); ConsolePlayer.getConsole().sendMessage( TranslatableCaption.of("flags.area_flags"), - Template.of("flags", flagsComponent) + Template.of("flags", flags.toString()) ); this.spawnEggs = config.getBoolean("event.spawn.egg"); @@ -433,13 +429,9 @@ public abstract class PlotArea { } } this.getRoadFlagContainer().addAll(parseFlags(roadflags)); - - Component roadFlagsComponent = null; - Collection> roadFlagCollection = this.getRoadFlagContainer().getFlagMap().values(); - roadFlagsComponent = getFlagsComponent(roadFlagsComponent, roadFlagCollection); ConsolePlayer.getConsole().sendMessage( TranslatableCaption.of("flags.road_flags"), - Template.of("flags", roadFlagsComponent) + Template.of("flags", roadflags.toString()) ); loadConfiguration(config);