mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-02-26 03:22:23 +01:00
feature: Add language files to debugpaste
This commit is contained in:
parent
48386c0828
commit
197fbb6617
@ -32,6 +32,7 @@ import com.intellectualsites.paster.IncendoPaster;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.configuration.Storage;
|
||||
import com.plotsquared.core.configuration.caption.StaticCaption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.inject.annotations.ConfigFile;
|
||||
import com.plotsquared.core.inject.annotations.WorldFile;
|
||||
@ -46,6 +47,7 @@ import java.io.IOException;
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@CommandDeclaration(command = "debugpaste",
|
||||
@ -173,6 +175,24 @@ public class DebugPaste extends SubCommand {
|
||||
);
|
||||
}
|
||||
|
||||
final File langDir = new File(
|
||||
PlotSquared.platform().getDirectory(),
|
||||
"lang"
|
||||
);
|
||||
|
||||
try {
|
||||
for (File current : langDir.listFiles()) {
|
||||
try {
|
||||
if (current.getName().startsWith("messages_") && current.getName().endsWith(".json")) {
|
||||
incendoPaster.addFile(current);
|
||||
}
|
||||
} catch (NullPointerException ignored) {
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException ignored) {
|
||||
//No lang files found
|
||||
}
|
||||
|
||||
try {
|
||||
final String rawResponse = incendoPaster.upload();
|
||||
final JsonObject jsonObject =
|
||||
|
Loading…
Reference in New Issue
Block a user