Fix NPE in WaterWave

This commit is contained in:
jedk1 2015-12-21 23:52:26 +00:00
parent a91c165ce0
commit fa92bbe67e

View file

@ -276,9 +276,11 @@ public class WaterWave {
public void remove() { public void remove() {
instances.remove(this); instances.remove(this);
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName()); if (player != null && player.isOnline()) {
if (bPlayer != null) { BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
bPlayer.addCooldown("WaterWave", cooldown); if (bPlayer != null) {
bPlayer.addCooldown("WaterWave", cooldown);
}
} }
revertBlocks(); revertBlocks();
for (BukkitRunnable task : tasks) for (BukkitRunnable task : tasks)