1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

formatting applied to most of the source code to tidy things up, and misc refactors

This commit is contained in:
nossr50
2025-07-03 14:03:43 -07:00
parent f322d05159
commit e52371aeb3
440 changed files with 11762 additions and 7365 deletions

View File

@@ -8,7 +8,8 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
public final class AbilityAPI {
private AbilityAPI() {}
private AbilityAPI() {
}
public static boolean berserkEnabled(Player player) {
return UserManager.getPlayer(player).getAbilityMode(SuperAbilityType.BERSERK);
@@ -39,10 +40,10 @@ public final class AbilityAPI {
}
public static boolean isAnyAbilityEnabled(Player player) {
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
final McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
for (SuperAbilityType ability : SuperAbilityType.values()) {
if (mcMMOPlayer.getAbilityMode(ability)) {
if (mmoPlayer.getAbilityMode(ability)) {
return true;
}
}
@@ -84,9 +85,7 @@ public final class AbilityAPI {
public static boolean isBleeding(LivingEntity entity) {
if (entity.isValid()) {
if (entity.hasMetadata(MetadataConstants.METADATA_KEY_RUPTURE)) {
return true;
}
return entity.hasMetadata(MetadataConstants.METADATA_KEY_RUPTURE);
}
return false;