Skip to content

Commit

Permalink
Add link module to /ess dump
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy committed Jul 1, 2023
1 parent bb33085 commit 5487688
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
files.add(new PasteUtil.PasteFile("dump.json", dump.toString()));

final Plugin essDiscord = Bukkit.getPluginManager().getPlugin("EssentialsDiscord");
final Plugin essDiscordLink = Bukkit.getPluginManager().getPlugin("EssentialsDiscordLink");
final Plugin essSpawn = Bukkit.getPluginManager().getPlugin("EssentialsSpawn");

final Map<String, Command> knownCommandsCopy = new HashMap<>(ess.getKnownCommandsProvider().getKnownCommands());
Expand Down Expand Up @@ -389,6 +390,15 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
} catch (IOException e) {
sender.sendMessage(tl("dumpErrorUpload", "discord-config.yml", e.getMessage()));
}

if (essDiscordLink != null) {
try {
files.add(new PasteUtil.PasteFile("discord-link-config.yml",
new String(Files.readAllBytes(essDiscordLink.getDataFolder().toPath().resolve("config.yml")), StandardCharsets.UTF_8)));
} catch (IOException e) {
sender.sendMessage(tl("dumpErrorUpload", "discord-link-config.yml", e.getMessage()));
}
}
}

if (kits) {
Expand Down

0 comments on commit 5487688

Please sign in to comment.