mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +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)) {
|
for (Entity entity : Methods.getEntitiesAroundPoint(player.getLocation(), range)) {
|
||||||
if (Methods.isRegionProtectedFromBuild(player, "BreathSphere", entity.getLocation()))
|
if (Methods.isRegionProtectedFromBuild(player, "BreathSphere", entity.getLocation()))
|
||||||
continue;
|
continue;
|
||||||
|
if (entity.getEntityId() == player.getEntityId()) continue;
|
||||||
entities.add(entity);
|
entities.add(entity);
|
||||||
if (!targetentities.containsKey(entity) && entity instanceof LivingEntity) {
|
if (!targetentities.containsKey(entity) && entity instanceof LivingEntity) {
|
||||||
Methods.damageEntity(player, entity, 0);
|
Methods.damageEntity(player, entity, 0);
|
||||||
|
@ -111,6 +112,12 @@ public class BreathSphere {
|
||||||
if (entity instanceof Creature) {
|
if (entity instanceof Creature) {
|
||||||
((Creature) entity).setTarget(player);
|
((Creature) entity).setTarget(player);
|
||||||
}
|
}
|
||||||
|
if (entity instanceof Player) {
|
||||||
|
if (AvatarState.isAvatarState((Player) entity)) {
|
||||||
|
remove(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (entity.isDead()) {
|
if (entity.isDead()) {
|
||||||
instances.remove(player);
|
instances.remove(player);
|
||||||
}
|
}
|
||||||
|
@ -134,6 +141,12 @@ public class BreathSphere {
|
||||||
if (entity instanceof Creature) {
|
if (entity instanceof Creature) {
|
||||||
((Creature) entity).setTarget(null);
|
((Creature) entity).setTarget(null);
|
||||||
}
|
}
|
||||||
|
if (entity instanceof Player) {
|
||||||
|
if (AvatarState.isAvatarState((Player) entity)) {
|
||||||
|
remove(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (entity.isDead()) {
|
if (entity.isDead()) {
|
||||||
instances.remove(player);
|
instances.remove(player);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ permissions:
|
||||||
bending.earth.passive: true
|
bending.earth.passive: true
|
||||||
bending.earth.metalbending: true
|
bending.earth.metalbending: true
|
||||||
bending.earth.grapplinghook: true
|
bending.earth.grapplinghook: true
|
||||||
bending.ability.LavaSurge
|
bending.ability.LavaSurge: true
|
||||||
bending.fire:
|
bending.fire:
|
||||||
default: true
|
default: true
|
||||||
description: Grants access to all firebending abilities.
|
description: Grants access to all firebending abilities.
|
||||||
|
|
Loading…
Reference in a new issue