Fix WaterSpout and Water Passive

This commit is contained in:
MistPhizzle 2014-07-18 13:29:48 -04:00
parent 3b8bbf53c2
commit 3d707be2aa
3 changed files with 6 additions and 3 deletions

View file

@ -88,7 +88,6 @@ public class AbilityModuleManager {
if (a == StockAbilities.Torrent) shiftabilities.add(a.name()); if (a == StockAbilities.Torrent) shiftabilities.add(a.name());
if (a == StockAbilities.WaterManipulation) shiftabilities.add(a.name()); if (a == StockAbilities.WaterManipulation) shiftabilities.add(a.name());
if (a == StockAbilities.IceSpike) shiftabilities.add(a.name()); if (a == StockAbilities.IceSpike) shiftabilities.add(a.name());
if (a == StockAbilities.WaterSpout) shiftabilities.add(a.name());
} }
} }
else if (StockAbilities.isEarthbending(a)) { else if (StockAbilities.isEarthbending(a)) {

View file

@ -28,11 +28,15 @@ public class WaterPassive {
for (Player player: Bukkit.getServer().getOnlinePlayers()) { for (Player player: Bukkit.getServer().getOnlinePlayers()) {
String ability = Methods.getBoundAbility(player); String ability = Methods.getBoundAbility(player);
if (Methods.canBendPassive(player.getName(), Element.Water)) { if (Methods.canBendPassive(player.getName(), Element.Water)) {
if (ability == null || !AbilityModuleManager.shiftabilities.contains(ability)) { if (WaterSpout.instances.containsKey(player)) {
continue;
}
else if (ability == null || !AbilityModuleManager.shiftabilities.contains(ability)) {
if (player.isSneaking() && Methods.isWater(player.getLocation().getBlock())) { if (player.isSneaking() && Methods.isWater(player.getLocation().getBlock())) {
player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor)); player.setVelocity(player.getEyeLocation().getDirection().clone().normalize().multiply(swimFactor));
} }
} }
// if (player.getLocation().getBlock().isLiquid()) { // if (player.getLocation().getBlock().isLiquid()) {
// for (Block block: Methods.getBlocksAroundPoint(player.getLocation(), 2)) { // for (Block block: Methods.getBlocksAroundPoint(player.getLocation(), 2)) {
// if (Methods.isAdjacentToThreeOrMoreSources(block) && Methods.isWater(block) && !tempHaltPassive.contains(player.getName())) { // if (Methods.isAdjacentToThreeOrMoreSources(block) && Methods.isWater(block) && !tempHaltPassive.contains(player.getName())) {

View file

@ -1,6 +1,6 @@
name: ProjectKorra name: ProjectKorra
author: ProjectKorra author: ProjectKorra
version: 1.2.0 BETA 14 version: 1.2.0 BETA 15
main: com.projectkorra.ProjectKorra.ProjectKorra main: com.projectkorra.ProjectKorra.ProjectKorra
commands: commands:
projectkorra: projectkorra: