From 91c512bd7fadbb955e5b1e9835848cccc6c0fb39 Mon Sep 17 00:00:00 2001 From: ProSavage Date: Wed, 24 Oct 2018 10:50:35 -0500 Subject: [PATCH] Changed vault check method to not turn off plugin before it actually sends the message that vault is not present. --- .../com/massivecraft/factions/SavageFactions.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/SavageFactions.java b/src/main/java/com/massivecraft/factions/SavageFactions.java index 048cc187..36597073 100644 --- a/src/main/java/com/massivecraft/factions/SavageFactions.java +++ b/src/main/java/com/massivecraft/factions/SavageFactions.java @@ -114,7 +114,16 @@ public class SavageFactions extends MPlugin { // Vault dependency check. if (SavageFactions.plugin.getServer().getPluginManager().getPlugin("Vault") == null) { SavageFactions.plugin.log("Vault is not present, the plugin will not run properly."); - SavageFactions.plugin.getServer().getPluginManager().disablePlugin(SavageFactions.plugin); + this.onDisable(); + Bukkit.getScheduler().scheduleSyncDelayedTask(this, + new Runnable() { + @Override + public void run() { + SavageFactions.plugin.getServer().getPluginManager().disablePlugin(SavageFactions.plugin); + } + }, 20L); + return; + } int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);