From c6b0b99cd6e9cfb442e44a0fa5b2501251309513 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Fri, 22 Dec 2023 17:28:00 +0100 Subject: [PATCH] Fix MM update in plot condensation --- .../bukkit/util/TranslationUpdateManager.java | 13 +++++++++++-- .../java/com/plotsquared/core/command/Condense.java | 6 +++--- Core/src/main/resources/lang/messages_en.json | 6 +++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/TranslationUpdateManager.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/TranslationUpdateManager.java index 2e499c6c9..9d7109e5d 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/TranslationUpdateManager.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/TranslationUpdateManager.java @@ -47,7 +47,13 @@ public class TranslationUpdateManager { String usedGrants = "usedGrants"; String usedGrantsReplacement = "used_grants"; String remainingGrants = "remainingGrants"; - String rremainingGrantsReplacement = "remaining_grants"; + String remainingGrantsReplacement = "remaining_grants"; + String minimumRadius = "minimumRadius"; + String minimumRadiusReplacement = "minimum_radius"; + String maximumMoves = "maximumMoves"; + String maximumMovesReplacement = "maximum_moves"; + String userMove = "userMove"; + String userMoveReplacement = "user_move"; try (Stream paths = Files.walk(Paths.get(PlotSquared.platform().getDirectory().toPath().resolve("lang").toUri()))) { paths @@ -58,7 +64,10 @@ public class TranslationUpdateManager { replaceInFile(p, minHeight, minheightReplacement); replaceInFile(p, maxHeight, maxheightReplacement); replaceInFile(p, usedGrants, usedGrantsReplacement); - replaceInFile(p, remainingGrants, rremainingGrantsReplacement); + replaceInFile(p, remainingGrants, remainingGrantsReplacement); + replaceInFile(p, minimumRadius, minimumRadiusReplacement); + replaceInFile(p, maximumMoves, maximumMovesReplacement); + replaceInFile(p, userMove, userMoveReplacement); }); } } diff --git a/Core/src/main/java/com/plotsquared/core/command/Condense.java b/Core/src/main/java/com/plotsquared/core/command/Condense.java index 65bdb40ef..0a93ec84a 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Condense.java +++ b/Core/src/main/java/com/plotsquared/core/command/Condense.java @@ -256,11 +256,11 @@ public class Condense extends SubCommand { player.sendMessage(TranslatableCaption.of("condense.default_eval")); player.sendMessage( TranslatableCaption.of("condense.minimum_radius"), - TagResolver.resolver("minimumRadius", Tag.inserting(Component.text(minimumRadius))) + TagResolver.resolver("minimum_radius", Tag.inserting(Component.text(minimumRadius))) ); player.sendMessage( TranslatableCaption.of("condense.maximum_moved"), - TagResolver.resolver("maxMove", Tag.inserting(Component.text(maxMove))) + TagResolver.resolver("maximum_moves", Tag.inserting(Component.text(maxMove))) ); player.sendMessage(TranslatableCaption.of("condense.input_eval")); player.sendMessage( @@ -269,7 +269,7 @@ public class Condense extends SubCommand { ); player.sendMessage( TranslatableCaption.of("condense.estimated_moves"), - TagResolver.resolver("userMove", Tag.inserting(Component.text(userMove))) + TagResolver.resolver("user_move", Tag.inserting(Component.text(userMove))) ); player.sendMessage(TranslatableCaption.of("condense.eta")); player.sendMessage(TranslatableCaption.of("condense.radius_measured")); diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index 967520b59..278efc25e 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -248,11 +248,11 @@ "condense.skipping": "Skipping complex plot: .", "condense.task_stopped": "Task already stopped.", "condense.default_eval": "=== DEFAULT EVAL ===", - "condense.minimum_radius": "Minimum radius: ", - "condense.maximum_moved": "Maximum moved: ", + "condense.minimum_radius": "Minimum radius: ", + "condense.maximum_moved": "Maximum moved: ", "condense.input_eval": "=== INPUT EVAL ===", "condense.input_radius": "Input radius: ", - "condense.estimated_moves": "Estimated moves: ", + "condense.estimated_moves": "Estimated moves: ", "condense.eta": "Estimated time: No idea, times will drastically change based on the system performance and load.", "condense.radius_measured": " - Radius is measured in plot width.", "database.starting_conversion": "Starting...",