mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
@ -44,6 +44,10 @@ public final class MobHealthbarUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isBoss(target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
|
||||
|
||||
if (profile.getMobHealthbarType() == null) {
|
||||
@ -149,4 +153,21 @@ public final class MobHealthbarUtils {
|
||||
|
||||
return healthbar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given LivingEntity is a boss.
|
||||
*
|
||||
* @param livingEntity The {@link LivingEntity} of the livingEntity to check
|
||||
* @return true if the livingEntity is a boss, false otherwise
|
||||
*/
|
||||
public static boolean isBoss(LivingEntity livingEntity) {
|
||||
switch (livingEntity.getType()) {
|
||||
case ENDER_DRAGON:
|
||||
case WITHER:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return ModUtils.isCustomBossEntity(livingEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -291,4 +291,15 @@ public final class ModUtils {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a custom entity is a boss.
|
||||
*
|
||||
* @param entity The entity to check
|
||||
* @return true if the entity represents a boss, false otherwise
|
||||
*/
|
||||
public static boolean isCustomBossEntity(Entity entity) {
|
||||
//TODO: Finish this method
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user