Try to fix a npe in IslandManager

This commit is contained in:
Fabrizio La Rosa 2020-08-01 18:32:18 +02:00
parent 3fabd75aab
commit 00423eb5e4

View File

@ -1222,7 +1222,9 @@ public class IslandManager {
for (Player all : Bukkit.getOnlinePlayers()) {
PlayerData targetPlayerData = plugin.getPlayerDataManager().getPlayerData(all);
if (targetPlayerData.getOwner() != null && targetPlayerData.getOwner().equals(island.getOwnerUUID())) {
if (targetPlayerData != null &&
targetPlayerData.getOwner() != null &&
targetPlayerData.getOwner().equals(island.getOwnerUUID())) {
Scoreboard scoreboard = scoreboardManager.getScoreboard(all);
if (islandMembers == 1) {