Merge from DroppingAnvil/1.6.x
Added ability to disable dependency checks
This commit is contained in:
commit
a97e0f2b31
@ -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,9 +182,20 @@ public class FactionsPlugin extends MPlugin {
|
||||
}
|
||||
//Attempt to generate a permission list
|
||||
PermissionList.generateFile();
|
||||
|
||||
// Load Conf from disk
|
||||
Conf.load();
|
||||
//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;
|
||||
}
|
||||
com.massivecraft.factions.integration.Essentials.setup();
|
||||
hookedPlayervaults = setupPlayervaults();
|
||||
FPlayers.getInstance().load();
|
||||
|
Loading…
Reference in New Issue
Block a user