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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user