From 267bebd0e8e9c4e9508510ebdcbf7a6d43db1af7 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Tue, 1 Oct 2019 12:12:42 +0200 Subject: [PATCH 1/4] Improve world generator diagnosis --- .../plotsquared/plot/commands/DebugPaste.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index e9471e6e7..c3858265f 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -115,6 +115,15 @@ import java.util.stream.Collectors; "&cSkipping PlotSquared.use_THIS.yml because it's empty"); } + try { + final File MultiverseWorlds = + new File(PlotSquared.get().IMP.getDirectory(), "../../plugins/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 { final String rawResponse = incendoPaster.upload(); final JsonObject jsonObject = From b92d42e7cc2a55194cae691fbf0a3aaf24223487 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Tue, 1 Oct 2019 14:46:19 +0200 Subject: [PATCH 2/4] Add clarification to what files are pasted --- .../intellectualsites/plotsquared/plot/commands/DebugPaste.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index c3858265f..e57ecf211 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.stream.Collectors; @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 extends SubCommand { From c8c5d777a1aeff01ca8bd20ad3635fab0d3147ff Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 3 Oct 2019 00:40:41 +0200 Subject: [PATCH 3/4] Make paths... idk what to say here --- .../intellectualsites/plotsquared/plot/commands/DebugPaste.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index e57ecf211..747d17161 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -117,7 +117,7 @@ import java.util.stream.Collectors; try { final File MultiverseWorlds = - new File(PlotSquared.get().IMP.getDirectory(), "../../plugins/Multiverse-Core/worlds.yml"); + new File(PlotSquared.get().IMP.getDirectory(), "../Multiverse-Core/worlds.yml"); incendoPaster .addFile(new IncendoPaster.PasteFile("MultiverseCore/worlds.yml", readFile(MultiverseWorlds))); } catch (final IOException ignored) { From 120d36e41381e4bb17eeb03eb1bab166e3abedf6 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 3 Oct 2019 01:12:08 +0200 Subject: [PATCH 4/4] Add a confirmation to the debugpaste That should prevent people from accidentally pressing buttons (whyever you would do that) --- .../plotsquared/plot/commands/DebugPaste.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java index 747d17161..9ea6d7bdd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugPaste.java @@ -25,8 +25,8 @@ import java.util.stream.Collectors; @CommandDeclaration(command = "debugpaste", aliases = "dp", usage = "/plot debugpaste", 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 - extends SubCommand { + permission = "plots.debugpaste", category = CommandCategory.DEBUG, confirmation = true, requiredType = RequiredType.NONE) +public class DebugPaste extends SubCommand { private static String readFile(@NonNull final File file) throws IOException { final List lines;