From 85cb6e372041d8e6eecddf1990e30d5172b9ffb0 Mon Sep 17 00:00:00 2001 From: StrangeOne101 Date: Tue, 8 Dec 2015 23:28:17 +1300 Subject: [PATCH] Fix Fireball NPE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixes NPE in Fireball • Fixes measuring distance across worlds --- .../projectkorra/firebending/Fireball.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/projectkorra/projectkorra/firebending/Fireball.java b/src/com/projectkorra/projectkorra/firebending/Fireball.java index a583377f..8858d25b 100644 --- a/src/com/projectkorra/projectkorra/firebending/Fireball.java +++ b/src/com/projectkorra/projectkorra/firebending/Fireball.java @@ -261,6 +261,16 @@ public class Fireball implements ConfigLoadable { } public boolean progress() { + if (player.isDead() || !player.isOnline()) { + remove(); + return false; + } + + if (!player.getWorld().equals(location.getWorld())) { + remove(); + return false; + } + if (GeneralMethods.getBoundAbility(player) == null) { remove(); return false;