Merge 6f857c917a
into c65c9e7827
This commit is contained in:
commit
2c322df165
|
@ -41,7 +41,9 @@ import java.io.IOException;
|
|||
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",
|
||||
|
@ -170,6 +172,21 @@ public class DebugPaste extends SubCommand {
|
|||
);
|
||||
}
|
||||
|
||||
final Path langDir = PlotSquared.platform().getDirectory().toPath().resolve("lang");
|
||||
if (Files.isDirectory(langDir)) {
|
||||
try (Stream<Path> 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 =
|
||||
|
|
Loading…
Reference in New Issue