mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 08:36:45 +01:00
Merge pull request #2517 from IntellectualSites/debugpaste-update
Improve world generator diagnosis
This commit is contained in:
commit
9ad2537ca2
@ -24,9 +24,9 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste",
|
@CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste",
|
||||||
description = "Upload settings.yml, worlds.yml, PlotSquared.use_THIS.yml and your latest.log to https://athion.net/ISPaster/paste",
|
description = "Upload settings.yml, worlds.yml, PlotSquared.use_THIS.yml your latest.log and Multiverse's worlds.yml (if being used) to https://athion.net/ISPaster/paste",
|
||||||
permission = "plots.debugpaste", category = CommandCategory.DEBUG) public class DebugPaste
|
permission = "plots.debugpaste", category = CommandCategory.DEBUG, confirmation = true, requiredType = RequiredType.NONE)
|
||||||
extends SubCommand {
|
public class DebugPaste extends SubCommand {
|
||||||
|
|
||||||
private static String readFile(@NonNull final File file) throws IOException {
|
private static String readFile(@NonNull final File file) throws IOException {
|
||||||
final List<String> lines;
|
final List<String> lines;
|
||||||
@ -115,6 +115,15 @@ import java.util.stream.Collectors;
|
|||||||
"&cSkipping PlotSquared.use_THIS.yml because it's empty");
|
"&cSkipping PlotSquared.use_THIS.yml because it's empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
final File MultiverseWorlds =
|
||||||
|
new File(PlotSquared.get().IMP.getDirectory(), "../Multiverse-Core/worlds.yml");
|
||||||
|
incendoPaster
|
||||||
|
.addFile(new IncendoPaster.PasteFile("MultiverseCore/worlds.yml", readFile(MultiverseWorlds)));
|
||||||
|
} catch (final IOException ignored) {
|
||||||
|
MainUtil.sendMessage(player, "&cSkipping Multiverse worlds.yml because the plugin is not in use");
|
||||||
|
}
|
||||||
|
|
||||||
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