Fix armor issues

- Also added return statement in shockwave
This commit is contained in:
Benford 2016-03-28 22:52:03 -04:00
parent a09d1aab73
commit af24a227a3
2 changed files with 15 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.EarthAbility;
import com.projectkorra.projectkorra.util.TempBlock;
import com.projectkorra.projectkorra.util.TempPotionEffect;
import com.projectkorra.projectkorra.waterbending.PlantArmor;
import org.bukkit.Location;
import org.bukkit.Material;
@ -42,6 +43,12 @@ public class EarthArmor extends EarthAbility {
return;
}
if (hasAbility(player, PlantArmor.class)) {
PlantArmor abil = getAbility(player, PlantArmor.class);
abil.remove();
player.sendMessage("Previous ability reverted");
}
this.formed = false;
this.complete = false;
this.interval = 2000;

View file

@ -2,6 +2,7 @@ package com.projectkorra.projectkorra.waterbending;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.PlantAbility;
import com.projectkorra.projectkorra.earthbending.EarthArmor;
import org.bukkit.Color;
import org.bukkit.Location;
@ -43,10 +44,16 @@ public class PlantArmor extends PlantAbility {
if (hasAbility(player, PlantArmor.class)) {
return;
} else if (bPlayer.isOnCooldown(this)) {
} else if (!bPlayer.canBend(this)) {
return;
}
if (hasAbility(player, EarthArmor.class)) {
EarthArmor abil = getAbility(player, EarthArmor.class);
abil.remove();
player.sendMessage("Previous armor reverted");
}
block = getPlantSourceBlock(player, range, true);
if (block == null) {
return;