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() {
instances.remove(this);
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
if (bPlayer != null) {
bPlayer.addCooldown("WaterWave", cooldown);
if (player != null && player.isOnline()) {
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
if (bPlayer != null) {
bPlayer.addCooldown("WaterWave", cooldown);
}
}
revertBlocks();
for (BukkitRunnable task : tasks)