Adds ability to turn off dependency checks in conf.json
This commit is contained in:
parent
93744347db
commit
77c74e10ac
@ -226,7 +226,8 @@ public class Conf {
|
||||
/// Useful for HCF features.
|
||||
/// </summary>
|
||||
public static Set<Material> territoryBypassProtectedMaterials = EnumSet.noneOf(Material.class);
|
||||
|
||||
// Dependency check
|
||||
public static boolean dependencyCheck = true;
|
||||
// Economy settings
|
||||
public static boolean econEnabled = false;
|
||||
public static String econUniverseAccount = "";
|
||||
|
@ -168,18 +168,6 @@ public class FactionsPlugin extends MPlugin {
|
||||
mc114 = true;
|
||||
break;
|
||||
}
|
||||
//Dependency checks
|
||||
if (Bukkit.getPluginManager().isPluginEnabled("Vault") && Bukkit.getPluginManager().isPluginEnabled("Essentials")) {
|
||||
RegisteredServiceProvider<Economy> rsp = FactionsPlugin.this.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
FactionsPlugin.econ = rsp.getProvider();
|
||||
} else {
|
||||
divider();
|
||||
System.out.println("You are missing dependencies!");
|
||||
System.out.println("Please verify EssentialsX and Vault are installed!");
|
||||
Bukkit.getPluginManager().disablePlugin(instance);
|
||||
divider();
|
||||
return;
|
||||
}
|
||||
migrateFPlayerLeaders();
|
||||
log("==== End Setup ====");
|
||||
|
||||
@ -194,7 +182,18 @@ public class FactionsPlugin extends MPlugin {
|
||||
}
|
||||
//Attempt to generate a permission list
|
||||
PermissionList.generateFile();
|
||||
|
||||
//Dependency checks
|
||||
if (Conf.dependencyCheck && (Bukkit.getPluginManager().isPluginEnabled("Vault") && Bukkit.getPluginManager().isPluginEnabled("Essentials"))) {
|
||||
RegisteredServiceProvider<Economy> rsp = FactionsPlugin.this.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
FactionsPlugin.econ = rsp.getProvider();
|
||||
} else if (Conf.dependencyCheck) {
|
||||
divider();
|
||||
System.out.println("You are missing dependencies!");
|
||||
System.out.println("Please verify EssentialsX and Vault are installed!");
|
||||
Bukkit.getPluginManager().disablePlugin(instance);
|
||||
divider();
|
||||
return;
|
||||
}
|
||||
// Load Conf from disk
|
||||
Conf.load();
|
||||
com.massivecraft.factions.integration.Essentials.setup();
|
||||
|
Loading…
Reference in New Issue
Block a user