Merge pull request #460 from Simplicitee/master

Fix armor issues
This commit is contained in:
OmniCypher 2016-03-28 20:39:16 -07:00
commit 1f005973df
3 changed files with 14 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,11 @@ public class EarthArmor extends EarthAbility {
return;
}
if (hasAbility(player, PlantArmor.class)) {
PlantArmor abil = getAbility(player, PlantArmor.class);
abil.remove();
}
this.formed = false;
this.complete = false;
this.interval = 2000;

View file

@ -37,6 +37,7 @@ public class Shockwave extends EarthAbility {
if (fall) {
fallShockwave();
return;
}
start();

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,15 @@ 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();
}
block = getPlantSourceBlock(player, range, true);
if (block == null) {
return;