From 13d7357c8523487b40b4f1c1bbe4815f8a3d6a7c Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 10 May 2022 01:43:01 +0100 Subject: [PATCH] Niceties - Better ordering of augmented information printed to consol on startup - Override --- .../bukkit/generator/DelegatePlotGenerator.java | 3 ++- .../java/com/plotsquared/core/PlotSquared.java | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java index 93d60997b..0ce6554d8 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/DelegatePlotGenerator.java @@ -80,7 +80,8 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { result.setBiome(x, z, BukkitAdapter.adapt(biome)); } - //do not annotate with Override until we discontinue support for 1.4.4 + //do not annotate with Override until we discontinue support for 1.4.4 (we no longer support 1.4.4) + @Override public void setBiome(int x, int y, int z, @NonNull Biome biome) { result.setBiome(x, z, BukkitAdapter.adapt(biome)); diff --git a/Core/src/main/java/com/plotsquared/core/PlotSquared.java b/Core/src/main/java/com/plotsquared/core/PlotSquared.java index 872d1bd68..9c9bb09f3 100644 --- a/Core/src/main/java/com/plotsquared/core/PlotSquared.java +++ b/Core/src/main/java/com/plotsquared/core/PlotSquared.java @@ -889,8 +889,8 @@ public class PlotSquared { e.printStackTrace(); } LOGGER.info("| generator: {}>{}", baseGenerator, areaGen); - LOGGER.info("| plot world: {}", pa); - LOGGER.info("| manager: {}", pa); + LOGGER.info("| plot world: {}", pa.getClass().getCanonicalName()); + LOGGER.info("| manager: {}", pa.getPlotManager().getClass().getCanonicalName()); LOGGER.info("Note: Area created for cluster '{}' (invalid or old configuration?)", name); areaGen.getPlotGenerator().initialize(pa); areaGen.augment(pa); @@ -906,6 +906,13 @@ public class PlotSquared { throw new IllegalArgumentException("Invalid Generator: " + gen_string); } PlotArea pa = areaGen.getPlotGenerator().getNewPlotArea(world, null, null, null); + LOGGER.info("- generator: {}>{}", baseGenerator, areaGen); + LOGGER.info("- plot world: {}", pa.getClass().getCanonicalName()); + LOGGER.info("- plot area manager: {}", pa.getPlotManager().getClass().getCanonicalName()); + if (!this.worldConfiguration.contains(path)) { + this.worldConfiguration.createSection(path); + worldSection = this.worldConfiguration.getConfigurationSection(path); + } pa.saveConfiguration(worldSection); pa.loadDefaultConfiguration(worldSection); try { @@ -913,9 +920,6 @@ public class PlotSquared { } catch (IOException e) { e.printStackTrace(); } - LOGGER.info("- generator: {}>{}", baseGenerator, areaGen); - LOGGER.info("- plot world: {}", pa); - LOGGER.info("- plot area manager: {}", pa.getPlotManager()); areaGen.getPlotGenerator().initialize(pa); areaGen.augment(pa); addPlotArea(pa);