From c741cd7da64f7a36828a1f5f68b320cf1074119b Mon Sep 17 00:00:00 2001 From: nathank33 Date: Sun, 14 Sep 2014 18:16:39 -0700 Subject: [PATCH] WaterWave NPE Fix If the user set the ChargeTime configuration option to 0 milliseconds then it was possible for the user to get NullPointerExceptions. --- src/com/projectkorra/ProjectKorra/waterbending/WaterWave.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/projectkorra/ProjectKorra/waterbending/WaterWave.java b/src/com/projectkorra/ProjectKorra/waterbending/WaterWave.java index c1bec027..526fe01f 100644 --- a/src/com/projectkorra/ProjectKorra/waterbending/WaterWave.java +++ b/src/com/projectkorra/ProjectKorra/waterbending/WaterWave.java @@ -103,6 +103,9 @@ public class WaterWave } else if(type == AbilityType.SHIFT) { + if(direction == null){ + direction = player.getEyeLocation().getDirection(); + } if(!charging) { if(!containsType(player, AbilityType.CLICK)){