Don't do the big error if heads don't work

This commit is contained in:
dordsor21 2022-06-09 22:00:51 +01:00
parent 2a79c0a419
commit 8d0cc68721
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -243,8 +243,15 @@ public class StateWrapper {
return true; return true;
} }
String player = skullOwner.getString("Name"); String player = skullOwner.getString("Name");
skull.setOwningPlayer(Bukkit.getOfflinePlayer(player)); if (player == null || player.isEmpty()) {
skull.update(true); return false;
}
try {
skull.setOwningPlayer(Bukkit.getOfflinePlayer(player));
skull.update(true);
} catch (Exception e) {
e.printStackTrace();
}
return true; return true;
} }
return false; return false;