mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-06-28 10:45:02 +02:00
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.ManagementFactory;
|
||||||
import java.lang.management.RuntimeMXBean;
|
import java.lang.management.RuntimeMXBean;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@CommandDeclaration(command = "debugpaste",
|
@CommandDeclaration(command = "debugpaste",
|
||||||
aliases = "dp",
|
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 {
|
try {
|
||||||
final String rawResponse = incendoPaster.upload();
|
final String rawResponse = incendoPaster.upload();
|
||||||
final JsonObject jsonObject =
|
final JsonObject jsonObject =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user