Merge pull request #43 from A248/master
Update ChunkListener to fix a minor NPE bug
This commit is contained in:
@@ -45,8 +45,12 @@ public class ChunkListener implements Listener {
|
|||||||
if (npc.getAutoHidden().contains(uuid)) {
|
if (npc.getAutoHidden().contains(uuid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
npc.hide(Bukkit.getPlayer(uuid), true);
|
// Bukkit.getPlayer(uuid) sometimes returns null
|
||||||
|
Player player = Bukkit.getPlayer(uuid);
|
||||||
|
if (player != null) {
|
||||||
|
npc.hide(player, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user