Merge pull request #392 from jedk1/master

Fix Water Bugs & Preset Bug
This commit is contained in:
OmniCypher 2016-02-09 07:06:01 -08:00
commit 1193d2cb3c
5 changed files with 6 additions and 7 deletions

View file

@ -1244,6 +1244,7 @@ public class GeneralMethods {
stopPlugin(); stopPlugin();
} }
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
Preset.unloadPreset(player);
GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName()); GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());
} }
plugin.updater.checkUpdate(); plugin.updater.checkUpdate();

View file

@ -66,7 +66,7 @@ public class SurgeWall extends WaterAbility {
SurgeWall wall = getAbility(player, SurgeWall.class); SurgeWall wall = getAbility(player, SurgeWall.class);
if (wall != null) { if (wall != null) {
if (wall.progressing) { if (wall.progressing) {
freezeThaw(); wall.freezeThaw();
} else if (prepare()) { } else if (prepare()) {
wall.remove(); wall.remove();
start(); start();

View file

@ -1,6 +1,5 @@
package com.projectkorra.projectkorra.waterbending; package com.projectkorra.projectkorra.waterbending;
import com.projectkorra.projectkorra.BendingManager;
import com.projectkorra.projectkorra.GeneralMethods; import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.WaterAbility; import com.projectkorra.projectkorra.ability.WaterAbility;
import com.projectkorra.projectkorra.util.TempBlock; import com.projectkorra.projectkorra.util.TempBlock;
@ -77,7 +76,7 @@ public class WaterArmsSpear extends WaterAbility {
spearRange = spearRangeFullMoon; spearRange = spearRangeFullMoon;
spearSphere = spearSphereFullMoon; spearSphere = spearSphereFullMoon;
spearDuration = spearDurationFullMoon; spearDuration = spearDurationFullMoon;
} else if (BendingManager.events.get(world).equalsIgnoreCase("FullMoon")) { } else if (isFullMoon(world)) {
spearRange = spearRangeFullMoon; spearRange = spearRangeFullMoon;
spearSphere = spearSphereFullMoon; spearSphere = spearSphereFullMoon;
spearDuration = spearDurationFullMoon; spearDuration = spearDurationFullMoon;

View file

@ -1,6 +1,5 @@
package com.projectkorra.projectkorra.waterbending; package com.projectkorra.projectkorra.waterbending;
import com.projectkorra.projectkorra.BendingManager;
import com.projectkorra.projectkorra.GeneralMethods; import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.WaterAbility; import com.projectkorra.projectkorra.ability.WaterAbility;
import com.projectkorra.projectkorra.ability.util.MultiAbilityManager; import com.projectkorra.projectkorra.ability.util.MultiAbilityManager;
@ -116,7 +115,7 @@ public class WaterArmsWhip extends WaterAbility {
} else { } else {
whipLength = whipLengthFullMoon; whipLength = whipLengthFullMoon;
} }
} else if (BendingManager.events.get(world).equalsIgnoreCase("FullMoon")) { } else if (isFullMoon(world)) {
if (ability.equals(Whip.PUNCH)) { if (ability.equals(Whip.PUNCH)) {
whipLength = punchLengthFullMoon; whipLength = punchLengthFullMoon;
} else { } else {

View file

@ -34,8 +34,8 @@ public class WaterReturn extends WaterAbility {
this.range = getNightFactor(range); this.range = getNightFactor(range);
if (bPlayer.canBend(this)) { if (bPlayer.canBendIgnoreBindsCooldowns(this)) {
if (isTransparent(player, block) && !block.isLiquid() && hasEmptyWaterBottle()) { if (isTransparent(player, block) && ((TempBlock.isTempBlock(block) && block.isLiquid()) || !block.isLiquid()) && hasEmptyWaterBottle()) {
this.block = new TempBlock(block, Material.WATER, (byte) 0); this.block = new TempBlock(block, Material.WATER, (byte) 0);
} }
} }