Fix entity NPE because Spigot is great

This commit is contained in:
BuildTools 2019-09-30 12:34:51 -06:00
parent f13a54e901
commit 1c0af0765e

View File

@ -291,6 +291,9 @@ public class Entity implements Listener {
return;
org.bukkit.entity.Entity target = event.getTarget();
// Somehow the target can be null, thanks Spigot.
if (target == null)
return;
IslandManager islandManager = skyblock.getIslandManager();
Island entityIsland = islandManager.getIslandAtLocation(entity.getLocation());