Fix a NPE in MobHealthDisplayUpdateTask

Band aid for broken isValid() function.
Fixes #1396
This commit is contained in:
TfT_02 2013-08-25 17:35:41 +02:00
parent 8e02b57369
commit 3c5bd3cedd

View File

@ -20,7 +20,7 @@ public class MobHealthDisplayUpdaterTask extends BukkitRunnable {
@Override
public void run() {
if (target.isValid()) {
if (target != null && target.isValid()) {
target.setCustomNameVisible(oldNameVisible);
target.setCustomName(oldName);
target.removeMetadata(mcMMO.customNameKey, mcMMO.p);