mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-08-16 16:37:07 +00:00
Fix armor issues
- Also added return statement in shockwave
This commit is contained in:
parent
a09d1aab73
commit
af24a227a3
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue