Skip to content

Commit

Permalink
Fix MM update in plot condensation
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMyFault committed Dec 22, 2023
1 parent dbfc43e commit c6b0b99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ public static void upgradeTranslationFile() throws IOException {
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<Path> paths = Files.walk(Paths.get(PlotSquared.platform().getDirectory().toPath().resolve("lang").toUri()))) {
paths
Expand All @@ -58,7 +64,10 @@ public static void upgradeTranslationFile() throws IOException {
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);
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions Core/src/main/java/com/plotsquared/core/command/Condense.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ public void run() {
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(
Expand All @@ -269,7 +269,7 @@ public void run() {
);
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"));
Expand Down
6 changes: 3 additions & 3 deletions Core/src/main/resources/lang/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@
"condense.skipping": "<prefix><red>Skipping complex plot: </red><gold><plot></gold><red>.</red>",
"condense.task_stopped": "<prefix><gold>Task already stopped.</gold>",
"condense.default_eval": "<dark_gray><strikethrough>=== <reset> <gold>DEFAULT EVAL </gold><dark_gray><strikethrough>===</dark_gray>",
"condense.minimum_radius": "<gold>Minimum radius: </gold><gray><minimumRadius></gray>",
"condense.maximum_moved": "<gold>Maximum moved: </gold><gray><maximumMoves></gray>",
"condense.minimum_radius": "<gold>Minimum radius: </gold><gray><minimum_radius></gray>",
"condense.maximum_moved": "<gold>Maximum moved: </gold><gray><maximum_moves></gray>",
"condense.input_eval": "<dark_gray><strikethrough>=== <reset> <gold>INPUT EVAL </gold><dark_gray><strikethrough>===</dark_gray>",
"condense.input_radius": "<gold>Input radius: </gold><gray><radius></gray>",
"condense.estimated_moves": "<gold>Estimated moves: </gold><gray><userMove></gray>",
"condense.estimated_moves": "<gold>Estimated moves: </gold><gray><user_move></gray>",
"condense.eta": "<prefix><gold>Estimated time: No idea, times will drastically change based on the system performance and load.</gold>",
"condense.radius_measured": "<yellow> - Radius is measured in plot width.</yellow>",
"database.starting_conversion": "<prefix><gold>Starting...</gold>",
Expand Down

0 comments on commit c6b0b99

Please sign in to comment.