mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fix armor issues
- Also added return statement in shockwave
This commit is contained in:
parent
a09d1aab73
commit
af24a227a3
2 changed files with 15 additions and 1 deletions
|
@ -4,6 +4,7 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||||
import com.projectkorra.projectkorra.util.TempBlock;
|
import com.projectkorra.projectkorra.util.TempBlock;
|
||||||
import com.projectkorra.projectkorra.util.TempPotionEffect;
|
import com.projectkorra.projectkorra.util.TempPotionEffect;
|
||||||
|
import com.projectkorra.projectkorra.waterbending.PlantArmor;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -42,6 +43,12 @@ public class EarthArmor extends EarthAbility {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasAbility(player, PlantArmor.class)) {
|
||||||
|
PlantArmor abil = getAbility(player, PlantArmor.class);
|
||||||
|
abil.remove();
|
||||||
|
player.sendMessage("Previous ability reverted");
|
||||||
|
}
|
||||||
|
|
||||||
this.formed = false;
|
this.formed = false;
|
||||||
this.complete = false;
|
this.complete = false;
|
||||||
this.interval = 2000;
|
this.interval = 2000;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.projectkorra.projectkorra.waterbending;
|
||||||
|
|
||||||
import com.projectkorra.projectkorra.GeneralMethods;
|
import com.projectkorra.projectkorra.GeneralMethods;
|
||||||
import com.projectkorra.projectkorra.ability.PlantAbility;
|
import com.projectkorra.projectkorra.ability.PlantAbility;
|
||||||
|
import com.projectkorra.projectkorra.earthbending.EarthArmor;
|
||||||
|
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
@ -43,10 +44,16 @@ public class PlantArmor extends PlantAbility {
|
||||||
|
|
||||||
if (hasAbility(player, PlantArmor.class)) {
|
if (hasAbility(player, PlantArmor.class)) {
|
||||||
return;
|
return;
|
||||||
} else if (bPlayer.isOnCooldown(this)) {
|
} else if (!bPlayer.canBend(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasAbility(player, EarthArmor.class)) {
|
||||||
|
EarthArmor abil = getAbility(player, EarthArmor.class);
|
||||||
|
abil.remove();
|
||||||
|
player.sendMessage("Previous armor reverted");
|
||||||
|
}
|
||||||
|
|
||||||
block = getPlantSourceBlock(player, range, true);
|
block = getPlantSourceBlock(player, range, true);
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue