diff --git a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java index dd643f6c54..338b02e321 100644 --- a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java @@ -46,7 +46,9 @@ import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.nio.file.Files; +import java.nio.file.Path; import java.util.concurrent.TimeUnit; +import java.util.stream.Stream; @CommandDeclaration(command = "debugpaste", aliases = "dp", @@ -173,6 +175,21 @@ public boolean onCommand(final PlotPlayer player, String[] args) { ); } + final Path langDir = PlotSquared.platform().getDirectory().toPath().resolve("lang"); + if (Files.isDirectory(langDir)) { + try (Stream files = Files.list(langDir)) { + files.filter(Files::isRegularFile) + .filter(path -> path.getFileName().toString().startsWith("messages_") && + path.getFileName().toString().endsWith(".json") + ).forEach(path -> { + try { + incendoPaster.addFile(path.toFile()); + } catch (IOException ignored) { + } + }); + } + } + try { final String rawResponse = incendoPaster.upload(); final JsonObject jsonObject =