Skip to content

Commit

Permalink
fix: NPE while setting owner of skull
Browse files Browse the repository at this point in the history
  • Loading branch information
RoinujNosde committed May 12, 2024
1 parent 67d3e70 commit 5212296
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private static void setOneTimeUseListener(SCComponent c, @Nullable Runnable list
@SuppressWarnings("deprecation")
public static void setOwningPlayer(@NotNull ItemStack item, @NotNull OfflinePlayer player) {
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
if (itemMeta == null) {
if (itemMeta == null || player.getName() == null) {
return;
}
try {
Expand Down

0 comments on commit 5212296

Please sign in to comment.