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.
|
/// Useful for HCF features.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Set<Material> territoryBypassProtectedMaterials = EnumSet.noneOf(Material.class);
|
public static Set<Material> territoryBypassProtectedMaterials = EnumSet.noneOf(Material.class);
|
||||||
|
// Dependency check
|
||||||
|
public static boolean dependencyCheck = true;
|
||||||
// Economy settings
|
// Economy settings
|
||||||
public static boolean econEnabled = false;
|
public static boolean econEnabled = false;
|
||||||
public static String econUniverseAccount = "";
|
public static String econUniverseAccount = "";
|
||||||
|
@ -168,18 +168,6 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
mc114 = true;
|
mc114 = true;
|
||||||
break;
|
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();
|
migrateFPlayerLeaders();
|
||||||
log("==== End Setup ====");
|
log("==== End Setup ====");
|
||||||
|
|
||||||
@ -194,9 +182,20 @@ public class FactionsPlugin extends MPlugin {
|
|||||||
}
|
}
|
||||||
//Attempt to generate a permission list
|
//Attempt to generate a permission list
|
||||||
PermissionList.generateFile();
|
PermissionList.generateFile();
|
||||||
|
|
||||||
// Load Conf from disk
|
// Load Conf from disk
|
||||||
Conf.load();
|
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();
|
com.massivecraft.factions.integration.Essentials.setup();
|
||||||
hookedPlayervaults = setupPlayervaults();
|
hookedPlayervaults = setupPlayervaults();
|
||||||
FPlayers.getInstance().load();
|
FPlayers.getInstance().load();
|
||||||
|
Loading…
Reference in New Issue
Block a user