Compare commits

...

9 Commits

Author SHA1 Message Date
Xaver106 c6764ad0af
Merge 6f857c917a into c57d784df7 2024-04-23 02:10:53 +00:00
renovate[bot] c57d784df7 Update dependency xyz.jpenilla.run-paper to v2.2.4 2024-04-23 02:10:41 +00:00
xaver106 6f857c917a
refactor: undo unnecessary changes 2022-06-03 15:48:33 +02:00
xaver106 3fed8ba970
refactor: import cleanup 2022-06-03 00:01:20 +02:00
xaver106 0eef7220a6
refactor: implement `Path` and `Files` 2022-06-02 23:58:37 +02:00
xaver106 fe37fe3c10
refactor: remove old code 2022-06-02 12:33:24 +02:00
xaver106 58378dd900
refactor: replace try with if statements 2022-06-02 12:32:17 +02:00
xaver106 724c8a6148
refactor: cleanup imports 2022-06-01 23:54:32 +02:00
xaver106 197fbb6617
feature: Add language files to debugpaste 2022-06-01 23:48:22 +02:00
2 changed files with 18 additions and 1 deletions

View File

@ -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 =

View File

@ -37,7 +37,7 @@ shadow = "8.1.1"
grgit = "4.1.1"
spotless = "6.25.0"
nexus = "2.0.0"
runPaper = "2.2.3"
runPaper = "2.2.4"
[libraries]
# Platform expectations