Changed vault check method to not turn off plugin before it actually sends the message that vault is not present.

This commit is contained in:
ProSavage 2018-10-24 10:50:35 -05:00
parent ffc4812be9
commit 91c512bd7f

@ -114,8 +114,17 @@ public class SavageFactions extends MPlugin {
// Vault dependency check. // Vault dependency check.
if (SavageFactions.plugin.getServer().getPluginManager().getPlugin("Vault") == null) { if (SavageFactions.plugin.getServer().getPluginManager().getPlugin("Vault") == null) {
SavageFactions.plugin.log("Vault is not present, the plugin will not run properly."); SavageFactions.plugin.log("Vault is not present, the plugin will not run properly.");
this.onDisable();
Bukkit.getScheduler().scheduleSyncDelayedTask(this,
new Runnable() {
@Override
public void run() {
SavageFactions.plugin.getServer().getPluginManager().disablePlugin(SavageFactions.plugin); SavageFactions.plugin.getServer().getPluginManager().disablePlugin(SavageFactions.plugin);
} }
}, 20L);
return;
}
int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]); int version = Integer.parseInt(ReflectionUtils.PackageType.getServerVersion().split("_")[1]);
if (version == 7) { if (version == 7) {