Fix minimessage tag resolver in list command (#4290)

fix: update resolver tag names for list command
This commit is contained in:
Pierre Maurice Schwang
2024-01-12 09:35:11 +01:00
committed by GitHub
parent 8c44b2d2d2
commit e4613cfc62
3 changed files with 17 additions and 6 deletions

View File

@ -55,6 +55,14 @@ public class TranslationUpdateManager {
String userMove = "userMove";
String userMoveReplacement = "user_move";
// tag opening / closing characters are important, as the locale keys exist as well, which should not be replaced
String listInfoUnknown = "<info.unknown>";
String listInfoUnknownReplacement = "<unknown>";
String listInfoServer = "<info.server>";
String listInfoServerReplacement = "<server>";
String listInfoEveryone = "<info.everyone>";
String listInfoEveryoneReplacement = "<everyone>";
try (Stream<Path> paths = Files.walk(Paths.get(PlotSquared.platform().getDirectory().toPath().resolve("lang").toUri()))) {
paths
.filter(Files::isRegularFile)
@ -68,6 +76,9 @@ public class TranslationUpdateManager {
replaceInFile(p, minimumRadius, minimumRadiusReplacement);
replaceInFile(p, maximumMoves, maximumMovesReplacement);
replaceInFile(p, userMove, userMoveReplacement);
replaceInFile(p, listInfoUnknown, listInfoUnknownReplacement);
replaceInFile(p, listInfoServer, listInfoServerReplacement);
replaceInFile(p, listInfoEveryone, listInfoEveryoneReplacement);
});
}
}