mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Fix entity NPE because Spigot is great
This commit is contained in:
parent
f13a54e901
commit
1c0af0765e
@ -291,6 +291,9 @@ public class Entity implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
org.bukkit.entity.Entity target = event.getTarget();
|
org.bukkit.entity.Entity target = event.getTarget();
|
||||||
|
// Somehow the target can be null, thanks Spigot.
|
||||||
|
if (target == null)
|
||||||
|
return;
|
||||||
|
|
||||||
IslandManager islandManager = skyblock.getIslandManager();
|
IslandManager islandManager = skyblock.getIslandManager();
|
||||||
Island entityIsland = islandManager.getIslandAtLocation(entity.getLocation());
|
Island entityIsland = islandManager.getIslandAtLocation(entity.getLocation());
|
||||||
|
Loading…
Reference in New Issue
Block a user