Fixed Subelement death messages (#696)

This commit is contained in:
Sobki 2017-01-16 13:37:21 +10:00 committed by Christopher Martin
parent 4b8d9783d2
commit 8f205eccbf
2 changed files with 125 additions and 181 deletions

View file

@ -69,6 +69,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import com.projectkorra.projectkorra.Element.SubElement;
import com.projectkorra.projectkorra.ability.Ability; import com.projectkorra.projectkorra.ability.Ability;
import com.projectkorra.projectkorra.ability.AddonAbility; import com.projectkorra.projectkorra.ability.AddonAbility;
import com.projectkorra.projectkorra.ability.AirAbility; import com.projectkorra.projectkorra.ability.AirAbility;
@ -108,8 +109,6 @@ import com.projectkorra.projectkorra.chiblocking.passive.Acrobatics;
import com.projectkorra.projectkorra.chiblocking.passive.ChiPassive; import com.projectkorra.projectkorra.chiblocking.passive.ChiPassive;
import com.projectkorra.projectkorra.command.Commands; import com.projectkorra.projectkorra.command.Commands;
import com.projectkorra.projectkorra.configuration.ConfigManager; import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.earthbending.metal.Extraction;
import com.projectkorra.projectkorra.earthbending.metal.MetalClips;
import com.projectkorra.projectkorra.earthbending.Catapult; import com.projectkorra.projectkorra.earthbending.Catapult;
import com.projectkorra.projectkorra.earthbending.Collapse; import com.projectkorra.projectkorra.earthbending.Collapse;
import com.projectkorra.projectkorra.earthbending.CollapseWall; import com.projectkorra.projectkorra.earthbending.CollapseWall;
@ -123,8 +122,10 @@ import com.projectkorra.projectkorra.earthbending.RaiseEarthWall;
import com.projectkorra.projectkorra.earthbending.Shockwave; import com.projectkorra.projectkorra.earthbending.Shockwave;
import com.projectkorra.projectkorra.earthbending.Tremorsense; import com.projectkorra.projectkorra.earthbending.Tremorsense;
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow; import com.projectkorra.projectkorra.earthbending.lava.LavaFlow;
import com.projectkorra.projectkorra.earthbending.lava.LavaSurge;
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow.AbilityType; import com.projectkorra.projectkorra.earthbending.lava.LavaFlow.AbilityType;
import com.projectkorra.projectkorra.earthbending.lava.LavaSurge;
import com.projectkorra.projectkorra.earthbending.metal.Extraction;
import com.projectkorra.projectkorra.earthbending.metal.MetalClips;
import com.projectkorra.projectkorra.earthbending.passive.DensityShift; import com.projectkorra.projectkorra.earthbending.passive.DensityShift;
import com.projectkorra.projectkorra.earthbending.passive.EarthPassive; import com.projectkorra.projectkorra.earthbending.passive.EarthPassive;
import com.projectkorra.projectkorra.earthbending.sand.SandSpout; import com.projectkorra.projectkorra.earthbending.sand.SandSpout;
@ -143,12 +144,12 @@ import com.projectkorra.projectkorra.firebending.FireJet;
import com.projectkorra.projectkorra.firebending.FireShield; import com.projectkorra.projectkorra.firebending.FireShield;
import com.projectkorra.projectkorra.firebending.HeatControl; import com.projectkorra.projectkorra.firebending.HeatControl;
import com.projectkorra.projectkorra.firebending.HeatControl.HeatControlType; import com.projectkorra.projectkorra.firebending.HeatControl.HeatControlType;
import com.projectkorra.projectkorra.firebending.Illumination;
import com.projectkorra.projectkorra.firebending.WallOfFire;
import com.projectkorra.projectkorra.firebending.combo.FireCombo; import com.projectkorra.projectkorra.firebending.combo.FireCombo;
import com.projectkorra.projectkorra.firebending.combustion.Combustion; import com.projectkorra.projectkorra.firebending.combustion.Combustion;
import com.projectkorra.projectkorra.firebending.lightning.Lightning; import com.projectkorra.projectkorra.firebending.lightning.Lightning;
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer; import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
import com.projectkorra.projectkorra.firebending.Illumination;
import com.projectkorra.projectkorra.firebending.WallOfFire;
import com.projectkorra.projectkorra.object.HorizontalVelocityTracker; import com.projectkorra.projectkorra.object.HorizontalVelocityTracker;
import com.projectkorra.projectkorra.object.Preset; import com.projectkorra.projectkorra.object.Preset;
import com.projectkorra.projectkorra.util.BlockSource; import com.projectkorra.projectkorra.util.BlockSource;
@ -159,6 +160,12 @@ import com.projectkorra.projectkorra.util.PassiveHandler;
import com.projectkorra.projectkorra.util.TempArmor; import com.projectkorra.projectkorra.util.TempArmor;
import com.projectkorra.projectkorra.util.TempBlock; import com.projectkorra.projectkorra.util.TempBlock;
import com.projectkorra.projectkorra.waterbending.OctopusForm; import com.projectkorra.projectkorra.waterbending.OctopusForm;
import com.projectkorra.projectkorra.waterbending.SurgeWall;
import com.projectkorra.projectkorra.waterbending.SurgeWave;
import com.projectkorra.projectkorra.waterbending.Torrent;
import com.projectkorra.projectkorra.waterbending.WaterManipulation;
import com.projectkorra.projectkorra.waterbending.WaterSpout;
import com.projectkorra.projectkorra.waterbending.WaterSpoutWave;
import com.projectkorra.projectkorra.waterbending.blood.Bloodbending; import com.projectkorra.projectkorra.waterbending.blood.Bloodbending;
import com.projectkorra.projectkorra.waterbending.healing.HealingWaters; import com.projectkorra.projectkorra.waterbending.healing.HealingWaters;
import com.projectkorra.projectkorra.waterbending.ice.IceBlast; import com.projectkorra.projectkorra.waterbending.ice.IceBlast;
@ -166,12 +173,6 @@ import com.projectkorra.projectkorra.waterbending.ice.IceSpikeBlast;
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange; import com.projectkorra.projectkorra.waterbending.ice.PhaseChange;
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange.PhaseChangeType; import com.projectkorra.projectkorra.waterbending.ice.PhaseChange.PhaseChangeType;
import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArms; import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArms;
import com.projectkorra.projectkorra.waterbending.SurgeWall;
import com.projectkorra.projectkorra.waterbending.SurgeWave;
import com.projectkorra.projectkorra.waterbending.Torrent;
import com.projectkorra.projectkorra.waterbending.WaterManipulation;
import com.projectkorra.projectkorra.waterbending.WaterSpout;
import com.projectkorra.projectkorra.waterbending.WaterSpoutWave;
import com.projectkorra.projectkorra.waterbending.passive.Hydrosink; import com.projectkorra.projectkorra.waterbending.passive.Hydrosink;
import com.projectkorra.projectkorra.waterbending.passive.WaterPassive; import com.projectkorra.projectkorra.waterbending.passive.WaterPassive;
import com.projectkorra.rpg.RPGMethods; import com.projectkorra.rpg.RPGMethods;
@ -197,8 +198,7 @@ public class PKListener implements Listener {
Block block = event.getBlock(); Block block = event.getBlock();
Player player = event.getPlayer(); Player player = event.getPlayer();
if (SurgeWall.wasBrokenFor(player, block) || OctopusForm.wasBrokenFor(player, block) if (SurgeWall.wasBrokenFor(player, block) || OctopusForm.wasBrokenFor(player, block) || Torrent.wasBrokenFor(player, block) || WaterSpoutWave.wasBrokenFor(player, block)) {
|| Torrent.wasBrokenFor(player, block) || WaterSpoutWave.wasBrokenFor(player, block)) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
@ -311,18 +311,12 @@ public class PKListener implements Listener {
Block block = event.getBlock(); Block block = event.getBlock();
if (!WaterManipulation.canPhysicsChange(block) || !EarthPassive.canPhysicsChange(block) if (!WaterManipulation.canPhysicsChange(block) || !EarthPassive.canPhysicsChange(block) || Illumination.getBlocks().containsKey(block) || EarthAbility.getPreventPhysicsBlocks().contains(block)) {
|| Illumination.getBlocks().containsKey(block)
|| EarthAbility.getPreventPhysicsBlocks().contains(block)) {
event.setCancelled(true); event.setCancelled(true);
} }
// If there is a TempBlock of Air bellow FallingSand blocks, prevent it from updating. // If there is a TempBlock of Air bellow FallingSand blocks, prevent it from updating.
if (!event.isCancelled() if (!event.isCancelled() && (block.getType() == Material.SAND || block.getType() == Material.GRAVEL || block.getType() == Material.ANVIL) && TempBlock.isTempBlock(block.getRelative(BlockFace.DOWN)) && block.getRelative(BlockFace.DOWN).getType() == Material.AIR) {
&& (block.getType() == Material.SAND || block.getType() == Material.GRAVEL
|| block.getType() == Material.ANVIL)
&& TempBlock.isTempBlock(block.getRelative(BlockFace.DOWN))
&& block.getRelative(BlockFace.DOWN).getType() == Material.AIR) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -333,8 +327,7 @@ public class PKListener implements Listener {
return; return;
} }
Player player = event.getPlayer(); Player player = event.getPlayer();
if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
|| Suffocate.isBreathbent(player)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -358,8 +351,7 @@ public class PKListener implements Listener {
} else if (element != null) { } else if (element != null) {
prefix = element.getPrefix(); prefix = element.getPrefix();
} else { } else {
prefix = ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', prefix = ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Chat.Prefixes.Nonbender")) + " ";
ConfigManager.languageConfig.get().getString("Chat.Prefixes.Nonbender")) + " ";
} }
player.setDisplayName(player.getName()); player.setDisplayName(player.getName());
player.setDisplayName(prefix + ChatColor.RESET + player.getDisplayName()); player.setDisplayName(prefix + ChatColor.RESET + player.getDisplayName());
@ -379,8 +371,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
@ -432,8 +423,7 @@ public class PKListener implements Listener {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (event.getCause() == DamageCause.FIRE if (event.getCause() == DamageCause.FIRE && BlazeArc.getIgnitedBlocks().containsKey(entity.getLocation().getBlock())) {
&& BlazeArc.getIgnitedBlocks().containsKey(entity.getLocation().getBlock())) {
new FireDamageTimer(entity, BlazeArc.getIgnitedBlocks().get(entity.getLocation().getBlock())); new FireDamageTimer(entity, BlazeArc.getIgnitedBlocks().get(entity.getLocation().getBlock()));
} }
@ -482,31 +472,31 @@ public class PKListener implements Listener {
ItemStack cooked = drops.get(i); ItemStack cooked = drops.get(i);
Material material = drops.get(i).getType(); Material material = drops.get(i).getType();
switch (material) { switch (material) {
case RAW_BEEF: case RAW_BEEF:
cooked = new ItemStack(Material.COOKED_BEEF, 1); cooked = new ItemStack(Material.COOKED_BEEF, 1);
break; break;
case RAW_FISH: case RAW_FISH:
ItemStack salmon = new ItemStack(Material.RAW_FISH, 1, (short) 1); ItemStack salmon = new ItemStack(Material.RAW_FISH, 1, (short) 1);
if (drops.get(i).getDurability() == salmon.getDurability()) { if (drops.get(i).getDurability() == salmon.getDurability()) {
cooked = new ItemStack(Material.COOKED_FISH, 1, (short) 1); cooked = new ItemStack(Material.COOKED_FISH, 1, (short) 1);
} else { } else {
cooked = new ItemStack(Material.COOKED_FISH, 1); cooked = new ItemStack(Material.COOKED_FISH, 1);
} }
break; break;
case RAW_CHICKEN: case RAW_CHICKEN:
cooked = new ItemStack(Material.COOKED_CHICKEN, 1); cooked = new ItemStack(Material.COOKED_CHICKEN, 1);
break; break;
case PORK: case PORK:
cooked = new ItemStack(Material.GRILLED_PORK, 1); cooked = new ItemStack(Material.GRILLED_PORK, 1);
break; break;
case MUTTON: case MUTTON:
cooked = new ItemStack(Material.COOKED_MUTTON); cooked = new ItemStack(Material.COOKED_MUTTON);
break; break;
case RABBIT: case RABBIT:
cooked = new ItemStack(Material.COOKED_RABBIT); cooked = new ItemStack(Material.COOKED_RABBIT);
break; break;
default: default:
break; break;
} }
newDrops.add(cooked); newDrops.add(cooked);
@ -551,8 +541,7 @@ public class PKListener implements Listener {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity != null) { if (entity != null) {
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -565,8 +554,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -578,8 +566,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -591,8 +578,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -604,8 +590,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -654,8 +639,7 @@ public class PKListener implements Listener {
} }
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) if (Paralyze.isParalyzed(entity) || ChiCombo.isParalyzed(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
|| Suffocate.isBreathbent(entity)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -664,11 +648,9 @@ public class PKListener implements Listener {
public void onHorizontalCollision(HorizontalVelocityChangeEvent e) { public void onHorizontalCollision(HorizontalVelocityChangeEvent e) {
if (e.getEntity() instanceof LivingEntity) { if (e.getEntity() instanceof LivingEntity) {
if (e.getEntity().getEntityId() != e.getInstigator().getEntityId()) { if (e.getEntity().getEntityId() != e.getInstigator().getEntityId()) {
double minimumDistance = plugin.getConfig() double minimumDistance = plugin.getConfig().getDouble("Properties.HorizontalCollisionPhysics.WallDamageMinimumDistance");
.getDouble("Properties.HorizontalCollisionPhysics.WallDamageMinimumDistance");
double maxDamage = plugin.getConfig().getDouble("Properties.HorizontalCollisionPhysics.WallDamageCap"); double maxDamage = plugin.getConfig().getDouble("Properties.HorizontalCollisionPhysics.WallDamageCap");
double damage = ((e.getDistanceTraveled() - minimumDistance) < 0 ? 0 double damage = ((e.getDistanceTraveled() - minimumDistance) < 0 ? 0 : e.getDistanceTraveled() - minimumDistance) / (e.getDifference().length());
: e.getDistanceTraveled() - minimumDistance) / (e.getDifference().length());
if (damage > 0) { if (damage > 0) {
if (damage <= maxDamage) { if (damage <= maxDamage) {
DamageHandler.damageEntity((LivingEntity) e.getEntity(), damage, e.getAbility()); DamageHandler.damageEntity((LivingEntity) e.getEntity(), damage, e.getAbility());
@ -687,15 +669,13 @@ public class PKListener implements Listener {
} }
for (MetalClips clips : CoreAbility.getAbilities(MetalClips.class)) { for (MetalClips clips : CoreAbility.getAbilities(MetalClips.class)) {
if (clips.getTargetEntity() != null if (clips.getTargetEntity() != null && clips.getTargetEntity().getEntityId() == event.getWhoClicked().getEntityId()) {
&& clips.getTargetEntity().getEntityId() == event.getWhoClicked().getEntityId()) {
event.setCancelled(true); event.setCancelled(true);
break; break;
} }
} }
if (event.getSlotType() == SlotType.ARMOR if (event.getSlotType() == SlotType.ARMOR && CoreAbility.hasAbility((Player) event.getWhoClicked(), EarthArmor.class)) {
&& CoreAbility.hasAbility((Player) event.getWhoClicked(), EarthArmor.class)) {
event.setCancelled(true); event.setCancelled(true);
} }
@ -706,10 +686,8 @@ public class PKListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL) @EventHandler(priority = EventPriority.NORMAL)
public void onPlayerBendingDeath(EntityBendingDeathEvent event) { public void onPlayerBendingDeath(EntityBendingDeathEvent event) {
if (ConfigManager.languageConfig.get().getBoolean("DeathMessages.Enabled") if (ConfigManager.languageConfig.get().getBoolean("DeathMessages.Enabled") && event.getEntity() instanceof Player) {
&& event.getEntity() instanceof Player) {
Ability ability = event.getAbility(); Ability ability = event.getAbility();
if (ability == null) { if (ability == null) {
return; return;
} }
@ -735,15 +713,10 @@ public class PKListener implements Listener {
Player player = event.getPlayer(); Player player = event.getPlayer();
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player); BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
String e = bPlayer == null || bPlayer.getElements().size() == 0 ? "Nonbender" String e = bPlayer == null || bPlayer.getElements().size() == 0 ? "Nonbender" : (bPlayer.getElements().size() > 1 ? "Avatar" : bPlayer.getElements().get(0).getName());
: (bPlayer.getElements().size() > 1 ? "Avatar" : bPlayer.getElements().get(0).getName());
String element = ConfigManager.languageConfig.get().getString("Chat.Prefixes." + e); String element = ConfigManager.languageConfig.get().getString("Chat.Prefixes." + e);
ChatColor c = bPlayer == null || bPlayer.getElements().size() == 0 ? ChatColor.WHITE ChatColor c = bPlayer == null || bPlayer.getElements().size() == 0 ? ChatColor.WHITE : (bPlayer.getElements().size() > 1 ? Element.AVATAR.getColor() : bPlayer.getElements().get(0).getColor());
: (bPlayer.getElements().size() > 1 ? Element.AVATAR.getColor() event.setFormat(event.getFormat().replace("{element}", c + element + ChatColor.RESET).replace("{ELEMENT}", c + element + ChatColor.RESET).replace("{elementcolor}", c + "").replace("{ELEMENTCOLOR}", c + ""));
: bPlayer.getElements().get(0).getColor());
event.setFormat(event.getFormat().replace("{element}", c + element + ChatColor.RESET)
.replace("{ELEMENT}", c + element + ChatColor.RESET).replace("{elementcolor}", c + "")
.replace("{ELEMENTCOLOR}", c + ""));
if (!ConfigManager.languageConfig.get().getBoolean("Chat.Enable")) { if (!ConfigManager.languageConfig.get().getBoolean("Chat.Enable")) {
return; return;
@ -787,8 +760,7 @@ public class PKListener implements Listener {
new Shockwave(player, true); new Shockwave(player, true);
} }
if (!event.isCancelled() && bPlayer.hasElement(Element.AIR) && event.getCause() == DamageCause.FALL if (!event.isCancelled() && bPlayer.hasElement(Element.AIR) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.AIR)) {
&& bPlayer.canBendPassive(Element.AIR)) {
new AirBurst(player, true); new AirBurst(player, true);
if (CoreAbility.getAbility(GracefulDescent.class).isEnabled()) { if (CoreAbility.getAbility(GracefulDescent.class).isEnabled()) {
event.setDamage(0D); event.setDamage(0D);
@ -796,25 +768,21 @@ public class PKListener implements Listener {
} }
} }
if (!event.isCancelled() && bPlayer.hasElement(Element.WATER) && event.getCause() == DamageCause.FALL if (!event.isCancelled() && bPlayer.hasElement(Element.WATER) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.WATER) && CoreAbility.getAbility(Hydrosink.class).isEnabled()) {
&& bPlayer.canBendPassive(Element.WATER) && CoreAbility.getAbility(Hydrosink.class).isEnabled()) {
if (WaterPassive.applyNoFall(player)) { if (WaterPassive.applyNoFall(player)) {
event.setDamage(0D); event.setDamage(0D);
event.setCancelled(true); event.setCancelled(true);
} }
} }
if (!event.isCancelled() && bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.FALL if (!event.isCancelled() && bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.EARTH) && CoreAbility.getAbility(DensityShift.class).isEnabled()) {
&& bPlayer.canBendPassive(Element.EARTH)
&& CoreAbility.getAbility(DensityShift.class).isEnabled()) {
if (EarthPassive.softenLanding(player)) { if (EarthPassive.softenLanding(player)) {
event.setDamage(0D); event.setDamage(0D);
event.setCancelled(true); event.setCancelled(true);
} }
} }
if (!event.isCancelled() && bPlayer.hasElement(Element.CHI) && event.getCause() == DamageCause.FALL if (!event.isCancelled() && bPlayer.hasElement(Element.CHI) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(Element.CHI) && CoreAbility.getAbility(Acrobatics.class).isEnabled()) {
&& bPlayer.canBendPassive(Element.CHI) && CoreAbility.getAbility(Acrobatics.class).isEnabled()) {
double initdamage = event.getDamage(); double initdamage = event.getDamage();
double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor(); double newdamage = event.getDamage() * ChiPassive.getFallReductionFactor();
double finaldamage = initdamage - newdamage; double finaldamage = initdamage - newdamage;
@ -830,13 +798,11 @@ public class PKListener implements Listener {
} }
} }
if (bPlayer.canBendPassive(Element.FIRE) && bPlayer.hasElement(Element.FIRE) if (bPlayer.canBendPassive(Element.FIRE) && bPlayer.hasElement(Element.FIRE) && (event.getCause() == DamageCause.FIRE || event.getCause() == DamageCause.FIRE_TICK)) {
&& (event.getCause() == DamageCause.FIRE || event.getCause() == DamageCause.FIRE_TICK)) {
event.setCancelled(!HeatControl.canBurn(player)); event.setCancelled(!HeatControl.canBurn(player));
} }
if (bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.SUFFOCATION if (bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.SUFFOCATION && TempBlock.isTempBlock(player.getEyeLocation().getBlock())) {
&& TempBlock.isTempBlock(player.getEyeLocation().getBlock())) {
event.setDamage(0D); event.setDamage(0D);
event.setCancelled(true); event.setCancelled(true);
} }
@ -938,39 +904,29 @@ public class PKListener implements Listener {
if (coreAbil != null) { if (coreAbil != null) {
element = coreAbil.getElement(); element = coreAbil.getElement();
} }
if (HorizontalVelocityTracker.hasBeenDamagedByHorizontalVelocity(event.getEntity()) && Arrays.asList(HorizontalVelocityTracker.abils).contains(tempAbility)) {
if (HorizontalVelocityTracker.hasBeenDamagedByHorizontalVelocity(event.getEntity()) if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath")) {
&& Arrays.asList(HorizontalVelocityTracker.abils).contains(tempAbility)) { message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath");
if (ConfigManager.languageConfig.get().contains(
"Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath")) {
message = ConfigManager.languageConfig.get().getString(
"Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath");
} }
} else if (element != null) { } else if (element != null) {
if (ConfigManager.languageConfig.get() if (element instanceof SubElement) {
.contains("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage")) { element = ((SubElement) element).getParentElement();
message = ConfigManager.languageConfig.get() }
.getString("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage"); if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage")) {
} else if (ConfigManager.languageConfig.get() message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage");
.contains("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage")) { } else if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString( message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage");
"Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage");
} }
} else { } else {
if (isAvatarAbility) { if (isAvatarAbility) {
if (ConfigManager.languageConfig.get() if (ConfigManager.languageConfig.get().contains("Abilities.Avatar." + tempAbility + ".DeathMessage")) {
.contains("Abilities.Avatar." + tempAbility + ".DeathMessage")) { message = ConfigManager.languageConfig.get().getString("Abilities.Avatar." + tempAbility + ".DeathMessage");
message = ConfigManager.languageConfig.get()
.getString("Abilities.Avatar." + tempAbility + ".DeathMessage");
} }
} else if (ConfigManager.languageConfig.get() } else if (ConfigManager.languageConfig.get().contains("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage")) {
.contains("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage")) { message = ConfigManager.languageConfig.get().getString("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage");
message = ConfigManager.languageConfig.get()
.getString("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage");
} }
} }
message = message.replace("{victim}", event.getEntity().getName()) message = message.replace("{victim}", event.getEntity().getName()).replace("{attacker}", event.getEntity().getKiller().getName()).replace("{ability}", ability);
.replace("{attacker}", event.getEntity().getKiller().getName()).replace("{ability}", ability);
event.setDeathMessage(message); event.setDeathMessage(message);
BENDING_PLAYER_DEATH.remove(event.getEntity()); BENDING_PLAYER_DEATH.remove(event.getEntity());
} }
@ -1010,8 +966,7 @@ public class PKListener implements Listener {
new EarthSmash(player, ClickType.RIGHT_CLICK); new EarthSmash(player, ClickType.RIGHT_CLICK);
} }
} }
if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
|| Suffocate.isBreathbent(player)) {
event.setCancelled(true); event.setCancelled(true);
} }
} }
@ -1029,13 +984,11 @@ public class PKListener implements Listener {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_ENTITY); ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_ENTITY);
} }
if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) if (Paralyze.isParalyzed(player) || ChiCombo.isParalyzed(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
|| Suffocate.isBreathbent(player)) {
event.setCancelled(true); event.setCancelled(true);
} }
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("HealingWaters") if (bPlayer.getBoundAbilityName().equalsIgnoreCase("HealingWaters") && event.getHand().equals(EquipmentSlot.HAND)) {
&& event.getHand().equals(EquipmentSlot.HAND)) {
HealingWaters instance = CoreAbility.getAbility(player, HealingWaters.class); HealingWaters instance = CoreAbility.getAbility(player, HealingWaters.class);
if (instance != null && instance.charged) { if (instance != null && instance.charged) {
instance.click(); instance.click();
@ -1064,7 +1017,7 @@ public class PKListener implements Listener {
public void onPlayerJoin(PlayerJoinEvent event) { public void onPlayerJoin(PlayerJoinEvent event) {
final Player player = event.getPlayer(); final Player player = event.getPlayer();
JUMPS.put(player, player.getStatistic(Statistic.JUMP)); JUMPS.put(player, player.getStatistic(Statistic.JUMP));
GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName()); GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());
Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, new Runnable() { Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, new Runnable() {
@ -1074,7 +1027,7 @@ public class PKListener implements Listener {
GeneralMethods.removeUnusableAbilities(player.getName()); GeneralMethods.removeUnusableAbilities(player.getName());
} }
}, 5); }, 5);
Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, new Runnable() { Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, new Runnable() {
public void run() { public void run() {
player.sendMessage(ChatColor.GREEN + "This server is running ProjectKorra version " + ProjectKorra.plugin.getDescription().getVersion() + " for bending! Find out more at http://www.projectkorra.com!"); player.sendMessage(ChatColor.GREEN + "This server is running ProjectKorra version " + ProjectKorra.plugin.getDescription().getVersion() + " for bending! Find out more at http://www.projectkorra.com!");
@ -1115,8 +1068,7 @@ public class PKListener implements Listener {
return; return;
} }
else if (CoreAbility.hasAbility(player, WaterSpout.class) || CoreAbility.hasAbility(player, AirSpout.class) else if (CoreAbility.hasAbility(player, WaterSpout.class) || CoreAbility.hasAbility(player, AirSpout.class) || CoreAbility.hasAbility(player, SandSpout.class)) {
|| CoreAbility.hasAbility(player, SandSpout.class)) {
Vector vel = new Vector(); Vector vel = new Vector();
vel.setX(event.getTo().getX() - event.getFrom().getX()); vel.setX(event.getTo().getX() - event.getFrom().getX());
vel.setZ(event.getTo().getZ() - event.getFrom().getZ()); vel.setZ(event.getTo().getZ() - event.getFrom().getZ());
@ -1165,8 +1117,7 @@ public class PKListener implements Listener {
} }
if (event.getTo().getY() > event.getFrom().getY()) { if (event.getTo().getY() > event.getFrom().getY()) {
if (!(player.getLocation().getBlock().getType() == Material.VINE) if (!(player.getLocation().getBlock().getType() == Material.VINE) && !(player.getLocation().getBlock().getType() == Material.LADDER)) {
&& !(player.getLocation().getBlock().getType() == Material.LADDER)) {
int current = player.getStatistic(Statistic.JUMP); int current = player.getStatistic(Statistic.JUMP);
int last = JUMPS.get(player); int last = JUMPS.get(player);
@ -1252,8 +1203,7 @@ public class PKListener implements Listener {
String abilName = bPlayer.getBoundAbilityName(); String abilName = bPlayer.getBoundAbilityName();
if (Suffocate.isBreathbent(player)) { if (Suffocate.isBreathbent(player)) {
if (!abilName.equalsIgnoreCase("AirSwipe") || !abilName.equalsIgnoreCase("FireBlast") if (!abilName.equalsIgnoreCase("AirSwipe") || !abilName.equalsIgnoreCase("FireBlast") || !abilName.equalsIgnoreCase("EarthBlast") || !abilName.equalsIgnoreCase("WaterManipulation")) {
|| !abilName.equalsIgnoreCase("EarthBlast") || !abilName.equalsIgnoreCase("WaterManipulation")) {
if (!player.isSneaking()) { if (!player.isSneaking()) {
event.setCancelled(true); event.setCancelled(true);
} }
@ -1379,7 +1329,6 @@ public class PKListener implements Listener {
} }
} }
} }
if (coreAbil instanceof FireAbility && bPlayer.isElementToggled(Element.FIRE) == true) { if (coreAbil instanceof FireAbility && bPlayer.isElementToggled(Element.FIRE) == true) {
@ -1491,8 +1440,7 @@ public class PKListener implements Listener {
} else if (abil.equalsIgnoreCase("AirSwipe")) { } else if (abil.equalsIgnoreCase("AirSwipe")) {
new AirSwipe(player); new AirSwipe(player);
} else if (abil.equalsIgnoreCase("Flight")) { } else if (abil.equalsIgnoreCase("Flight")) {
if (!ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.Flight.HoverEnabled") if (!ProjectKorra.plugin.getConfig().getBoolean("Abilities.Air.Flight.HoverEnabled") || !bPlayer.canUseFlight()) {
|| !bPlayer.canUseFlight()) {
return; return;
} }
@ -1561,9 +1509,7 @@ public class PKListener implements Listener {
MetalClips clips = CoreAbility.getAbility(player, MetalClips.class); MetalClips clips = CoreAbility.getAbility(player, MetalClips.class);
if (clips == null) { if (clips == null) {
new MetalClips(player, 0); new MetalClips(player, 0);
} else if (clips } else if (clips.getMetalClipsCount() < (player.hasPermission("bending.ability.MetalClips.4clips") ? 4 : 3)) {
.getMetalClipsCount() < (player.hasPermission("bending.ability.MetalClips.4clips") ? 4
: 3)) {
clips.shootMetal(); clips.shootMetal();
} else if (clips.getMetalClipsCount() == 4 && clips.isCanUse4Clips()) { } else if (clips.getMetalClipsCount() == 4 && clips.isCanUse4Clips()) {
clips.crush(); clips.crush();
@ -1631,11 +1577,11 @@ public class PKListener implements Listener {
} }
} }
} }
if (MultiAbilityManager.hasMultiAbilityBound(player)) { if (MultiAbilityManager.hasMultiAbilityBound(player)) {
abil = MultiAbilityManager.getBoundMultiAbility(player); abil = MultiAbilityManager.getBoundMultiAbility(player);
if (abil.equalsIgnoreCase("WaterArms")) { if (abil.equalsIgnoreCase("WaterArms")) {
new WaterArms(player); new WaterArms(player);
} }
} }
} }
@ -1647,9 +1593,7 @@ public class PKListener implements Listener {
} }
Player player = event.getPlayer(); Player player = event.getPlayer();
if (CoreAbility.hasAbility(player, Tornado.class) || Bloodbending.isBloodbent(player) if (CoreAbility.hasAbility(player, Tornado.class) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player) || CoreAbility.hasAbility(player, FireJet.class) || CoreAbility.hasAbility(player, AvatarState.class)) {
|| Suffocate.isBreathbent(player) || CoreAbility.hasAbility(player, FireJet.class)
|| CoreAbility.hasAbility(player, AvatarState.class)) {
event.setCancelled(player.getGameMode() != GameMode.CREATIVE); event.setCancelled(player.getGameMode() != GameMode.CREATIVE);
} }
} }

View file

@ -23,10 +23,11 @@ import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.WaterAbility; import com.projectkorra.projectkorra.ability.WaterAbility;
import com.projectkorra.projectkorra.util.DamageHandler; import com.projectkorra.projectkorra.util.DamageHandler;
import com.projectkorra.projectkorra.util.TempBlock; import com.projectkorra.projectkorra.util.TempBlock;
import com.projectkorra.projectkorra.waterbending.combo.WaterCombo.IceWave;
import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth; import com.projectkorra.projectkorra.waterbending.plant.PlantRegrowth;
public class WaterSpoutWave extends WaterAbility { public class WaterSpoutWave extends WaterAbility {
public static enum AbilityType { public static enum AbilityType {
CLICK, SHIFT, RELEASE CLICK, SHIFT, RELEASE
} }
@ -36,7 +37,7 @@ public class WaterSpoutWave extends WaterAbility {
} }
private static final Map<Block, TempBlock> FROZEN_BLOCKS = new ConcurrentHashMap<>(); private static final Map<Block, TempBlock> FROZEN_BLOCKS = new ConcurrentHashMap<>();
private double radius; private double radius;
private boolean charging; private boolean charging;
private boolean iceWave; private boolean iceWave;
@ -63,10 +64,10 @@ public class WaterSpoutWave extends WaterAbility {
private ArrayList<Entity> affectedEntities; private ArrayList<Entity> affectedEntities;
private ArrayList<BukkitRunnable> tasks; private ArrayList<BukkitRunnable> tasks;
private ConcurrentHashMap<Block, TempBlock> affectedBlocks; private ConcurrentHashMap<Block, TempBlock> affectedBlocks;
public WaterSpoutWave(Player player, AbilityType type) { public WaterSpoutWave(Player player, AbilityType type) {
super(player); super(player);
this.charging = false; this.charging = false;
this.iceWave = false; this.iceWave = false;
this.iceOnly = false; this.iceOnly = false;
@ -85,16 +86,16 @@ public class WaterSpoutWave extends WaterAbility {
this.affectedBlocks = new ConcurrentHashMap<>(); this.affectedBlocks = new ConcurrentHashMap<>();
this.affectedEntities = new ArrayList<>(); this.affectedEntities = new ArrayList<>();
this.tasks = new ArrayList<>(); this.tasks = new ArrayList<>();
this.damage = getNightFactor(this.damage); this.damage = getNightFactor(this.damage);
if (!bPlayer.canBend(this)) { if (!bPlayer.canBend(this)) {
return; return;
} }
this.time = System.currentTimeMillis(); this.time = System.currentTimeMillis();
this.type = type; this.type = type;
if (type == AbilityType.CLICK && CoreAbility.getAbility(player, WaterSpoutWave.class) != null) { if (type == AbilityType.CLICK && CoreAbility.getAbility(player, WaterSpoutWave.class) != null) {
WaterSpoutWave wave = CoreAbility.getAbility(player, WaterSpoutWave.class); WaterSpoutWave wave = CoreAbility.getAbility(player, WaterSpoutWave.class);
if (wave.charging || wave.moving) { if (wave.charging || wave.moving) {
@ -102,11 +103,11 @@ public class WaterSpoutWave extends WaterAbility {
return; return;
} }
} }
start(); start();
if (type == AbilityType.CLICK) { if (type == AbilityType.CLICK) {
// Need to progress immediately for the WaterSpout check // Need to progress immediately for the WaterSpout check
progress(); progress();
} }
} }
@ -133,18 +134,18 @@ public class WaterSpoutWave extends WaterAbility {
if (origin == null) { if (origin == null) {
removeOldType(player, AbilityType.CLICK); removeOldType(player, AbilityType.CLICK);
Block block = getWaterSourceBlock(player, selectRange, plant); Block block = getWaterSourceBlock(player, selectRange, plant);
if (block == null) { if (block == null) {
remove(); remove();
return; return;
} }
Block blockAbove = block.getRelative(BlockFace.UP); Block blockAbove = block.getRelative(BlockFace.UP);
if (blockAbove.getType() != Material.AIR && !isWaterbendable(blockAbove)) { if (blockAbove.getType() != Material.AIR && !isWaterbendable(blockAbove)) {
remove(); remove();
return; return;
} }
origin = block.getLocation(); origin = block.getLocation();
if (!isWaterbendable(block) || GeneralMethods.isRegionProtectedFromBuild(this, origin)) { if (!isWaterbendable(block) || GeneralMethods.isRegionProtectedFromBuild(this, origin)) {
remove(); remove();
@ -154,7 +155,7 @@ public class WaterSpoutWave extends WaterAbility {
return; return;
} }
} }
if (player.getLocation().distanceSquared(origin) > selectRange * selectRange) { if (player.getLocation().distanceSquared(origin) > selectRange * selectRange) {
remove(); remove();
return; return;
@ -173,11 +174,11 @@ public class WaterSpoutWave extends WaterAbility {
remove(); remove();
return; return;
} }
charging = true; charging = true;
animation = AnimateState.RISE; animation = AnimateState.RISE;
location = origin.clone(); location = origin.clone();
if (isPlant(origin.getBlock()) || isSnow(origin.getBlock())) { if (isPlant(origin.getBlock()) || isSnow(origin.getBlock())) {
new PlantRegrowth(player, origin.getBlock()); new PlantRegrowth(player, origin.getBlock());
origin.getBlock().setType(Material.AIR); origin.getBlock().setType(Material.AIR);
@ -199,7 +200,7 @@ public class WaterSpoutWave extends WaterAbility {
revertBlocks(); revertBlocks();
location.add(0, animationSpeed, 0); location.add(0, animationSpeed, 0);
Block block = location.getBlock(); Block block = location.getBlock();
if (!(isWaterbendable(block) || block.getType() == Material.AIR) || GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) { if (!(isWaterbendable(block) || block.getType() == Material.AIR) || GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) {
remove(); remove();
return; return;
@ -215,7 +216,7 @@ public class WaterSpoutWave extends WaterAbility {
Vector vec = GeneralMethods.getDirection(location, eyeLoc); Vector vec = GeneralMethods.getDirection(location, eyeLoc);
location.add(vec.normalize().multiply(animationSpeed)); location.add(vec.normalize().multiply(animationSpeed));
Block block = location.getBlock(); Block block = location.getBlock();
if (!(isWaterbendable(block) || block.getType() == Material.AIR) || GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) { if (!(isWaterbendable(block) || block.getType() == Material.AIR) || GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) {
remove(); remove();
return; return;
@ -236,7 +237,7 @@ public class WaterSpoutWave extends WaterAbility {
if (animation == AnimateState.SHRINK) { if (animation == AnimateState.SHRINK) {
radius -= 0.20; radius -= 0.20;
drawCircle(360, 15); drawCircle(360, 15);
if (radius < 1) { if (radius < 1) {
revertBlocks(); revertBlocks();
time = System.currentTimeMillis(); time = System.currentTimeMillis();
@ -249,7 +250,7 @@ public class WaterSpoutWave extends WaterAbility {
remove(); remove();
return; return;
} }
player.setFallDistance(0f); player.setFallDistance(0f);
double currentSpeed = speed - (speed * (System.currentTimeMillis() - time) / flightTime); double currentSpeed = speed - (speed * (System.currentTimeMillis() - time) / flightTime);
double nightSpeed = getNightFactor(currentSpeed * 0.9); double nightSpeed = getNightFactor(currentSpeed * 0.9);
@ -275,10 +276,10 @@ public class WaterSpoutWave extends WaterAbility {
if (entity != this.player && entity instanceof LivingEntity && !affectedEntities.contains(entity)) { if (entity != this.player && entity instanceof LivingEntity && !affectedEntities.contains(entity)) {
affectedEntities.add(entity); affectedEntities.add(entity);
final double augment = getNightFactor(player.getWorld()); final double augment = getNightFactor(player.getWorld());
DamageHandler.damageEntity(entity, damage, this); DamageHandler.damageEntity(entity, damage, CoreAbility.getAbility(player, IceWave.class));
final Player fplayer = this.player; final Player fplayer = this.player;
final Entity fent = entity; final Entity fent = entity;
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
@ -360,7 +361,7 @@ public class WaterSpoutWave extends WaterAbility {
final Block block = keys.nextElement(); final Block block = keys.nextElement();
final TempBlock tblock = affectedBlocks.get(block); final TempBlock tblock = affectedBlocks.get(block);
affectedBlocks.remove(block); affectedBlocks.remove(block);
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
@ -456,10 +457,9 @@ public class WaterSpoutWave extends WaterAbility {
public String getName() { public String getName() {
return "WaterSpout"; return "WaterSpout";
} }
@Override @Override
public Element getElement() public Element getElement() {
{
return this.isIceWave() ? Element.ICE : Element.WATER; return this.isIceWave() ? Element.ICE : Element.WATER;
} }
@ -467,7 +467,7 @@ public class WaterSpoutWave extends WaterAbility {
public long getCooldown() { public long getCooldown() {
return cooldown; return cooldown;
} }
@Override @Override
public boolean isSneakAbility() { public boolean isSneakAbility() {
return this.isIceWave() ? true : false; return this.isIceWave() ? true : false;
@ -477,7 +477,7 @@ public class WaterSpoutWave extends WaterAbility {
public boolean isHarmlessAbility() { public boolean isHarmlessAbility() {
return false; return false;
} }
@Override @Override
public boolean isCollidable() { public boolean isCollidable() {
return collidable; return collidable;
@ -659,5 +659,5 @@ public class WaterSpoutWave extends WaterAbility {
public void setLocation(Location location) { public void setLocation(Location location) {
this.location = location; this.location = location;
} }
} }