Fix phantom not being removed when newly spawned

This commit is contained in:
Simon Chuu 2019-06-04 05:15:57 -04:00
parent 1014aeb79a
commit 48fc942222
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ public class PhantomListener implements Listener {
if (ignorePlayer(p, newlySpawned)) {
if (e != null)
e.setCancelled(true);
else if (newlySpawned || !p.hasPermission(IGNORE_PERM) && plugin.removeTargetingRested && phantom.getCustomName() == null)
if (newlySpawned || !p.hasPermission(IGNORE_PERM) && plugin.removeTargetingRested && phantom.getCustomName() == null)
phantom.remove();
else
phantom.setTarget(null);