mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Couple of BreathSphere changes
A player entering the AvatarState will break out of the ability. A player can't hurt themselves with Breathbending in AvatarState
This commit is contained in:
parent
35de391fce
commit
8da02383c1
2 changed files with 14 additions and 1 deletions
|
@ -98,6 +98,7 @@ public class BreathSphere {
|
|||
for (Entity entity : Methods.getEntitiesAroundPoint(player.getLocation(), range)) {
|
||||
if (Methods.isRegionProtectedFromBuild(player, "BreathSphere", entity.getLocation()))
|
||||
continue;
|
||||
if (entity.getEntityId() == player.getEntityId()) continue;
|
||||
entities.add(entity);
|
||||
if (!targetentities.containsKey(entity) && entity instanceof LivingEntity) {
|
||||
Methods.damageEntity(player, entity, 0);
|
||||
|
@ -111,6 +112,12 @@ public class BreathSphere {
|
|||
if (entity instanceof Creature) {
|
||||
((Creature) entity).setTarget(player);
|
||||
}
|
||||
if (entity instanceof Player) {
|
||||
if (AvatarState.isAvatarState((Player) entity)) {
|
||||
remove(player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (entity.isDead()) {
|
||||
instances.remove(player);
|
||||
}
|
||||
|
@ -134,6 +141,12 @@ public class BreathSphere {
|
|||
if (entity instanceof Creature) {
|
||||
((Creature) entity).setTarget(null);
|
||||
}
|
||||
if (entity instanceof Player) {
|
||||
if (AvatarState.isAvatarState((Player) entity)) {
|
||||
remove(player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (entity.isDead()) {
|
||||
instances.remove(player);
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ permissions:
|
|||
bending.earth.passive: true
|
||||
bending.earth.metalbending: true
|
||||
bending.earth.grapplinghook: true
|
||||
bending.ability.LavaSurge
|
||||
bending.ability.LavaSurge: true
|
||||
bending.fire:
|
||||
default: true
|
||||
description: Grants access to all firebending abilities.
|
||||
|
|
Loading…
Reference in a new issue