mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixing an error due to confusingly named check
Refactored healthBarEnabled to healthBarPluginEnabled to avoid this from happening again.
This commit is contained in:
parent
4c7fb1854d
commit
3a37d0e092
@ -77,7 +77,7 @@ public class mcMMO extends JavaPlugin {
|
||||
|
||||
/* Plugin Checks */
|
||||
private static boolean combatTagEnabled;
|
||||
private static boolean healthBarEnabled;
|
||||
private static boolean healthBarPluginEnabled;
|
||||
|
||||
// Config Validation Check
|
||||
public boolean noErrorsInConfigFiles = true;
|
||||
@ -118,9 +118,9 @@ public class mcMMO extends JavaPlugin {
|
||||
}
|
||||
|
||||
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
|
||||
healthBarEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null;
|
||||
healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null;
|
||||
|
||||
if (healthBarEnabled) {
|
||||
if (healthBarPluginEnabled) {
|
||||
getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled.");
|
||||
}
|
||||
|
||||
@ -266,8 +266,8 @@ public class mcMMO extends JavaPlugin {
|
||||
return combatTagEnabled;
|
||||
}
|
||||
|
||||
public static boolean isHealthBarEnabled() {
|
||||
return healthBarEnabled;
|
||||
public static boolean isHealthBarPluginEnabled() {
|
||||
return healthBarPluginEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +40,7 @@ public final class MobHealthbarUtils {
|
||||
* @param damage damage done by the attack triggering this
|
||||
*/
|
||||
public static void handleMobHealthbars(Player player, LivingEntity target, double damage) {
|
||||
if (!mcMMO.isHealthBarEnabled() || !Permissions.mobHealthDisplay(player)) {
|
||||
if (mcMMO.isHealthBarPluginEnabled() || !Permissions.mobHealthDisplay(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user