mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +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 */
|
/* Plugin Checks */
|
||||||
private static boolean combatTagEnabled;
|
private static boolean combatTagEnabled;
|
||||||
private static boolean healthBarEnabled;
|
private static boolean healthBarPluginEnabled;
|
||||||
|
|
||||||
// Config Validation Check
|
// Config Validation Check
|
||||||
public boolean noErrorsInConfigFiles = true;
|
public boolean noErrorsInConfigFiles = true;
|
||||||
@ -118,9 +118,9 @@ public class mcMMO extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null;
|
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.");
|
getLogger().info("HealthBar plugin found, mcMMO's healthbars are automatically disabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,8 +266,8 @@ public class mcMMO extends JavaPlugin {
|
|||||||
return combatTagEnabled;
|
return combatTagEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isHealthBarEnabled() {
|
public static boolean isHealthBarPluginEnabled() {
|
||||||
return healthBarEnabled;
|
return healthBarPluginEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ public final class MobHealthbarUtils {
|
|||||||
* @param damage damage done by the attack triggering this
|
* @param damage damage done by the attack triggering this
|
||||||
*/
|
*/
|
||||||
public static void handleMobHealthbars(Player player, LivingEntity target, double damage) {
|
public static void handleMobHealthbars(Player player, LivingEntity target, double damage) {
|
||||||
if (!mcMMO.isHealthBarEnabled() || !Permissions.mobHealthDisplay(player)) {
|
if (mcMMO.isHealthBarPluginEnabled() || !Permissions.mobHealthDisplay(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user