mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Add link module to /ess dump
This commit is contained in:
parent
863b9cffc5
commit
d57094c0bc
@ -328,6 +328,7 @@ public class Commandessentials extends EssentialsCommand {
|
||||
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());
|
||||
@ -389,6 +390,15 @@ public class Commandessentials extends EssentialsCommand {
|
||||
} 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user