From 91e3f2f9aac7ab9d9ad2b2f1d617b5c9dc0c728f Mon Sep 17 00:00:00 2001 From: 1798643961 <1798643961@qq.com> Date: Sat, 6 Jan 2024 21:39:00 +0800 Subject: [PATCH] fix owner get name --- .../bukkit/craftbukkit/v1_20_R3/inventory/CraftMetaSkull.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/v1_20_R3/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/v1_20_R3/inventory/CraftMetaSkull.java index a8c4419c0..8c16f668d 100644 --- a/src/main/java/org/bukkit/craftbukkit/v1_20_R3/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/v1_20_R3/inventory/CraftMetaSkull.java @@ -190,11 +190,11 @@ public String getOwner() { @Override public OfflinePlayer getOwningPlayer() { if (hasOwner()) { - if (!profile.getId().equals(Util.NIL_UUID)) { + if (profile.getId() != null) { return Bukkit.getOfflinePlayer(profile.getId()); } - if (!profile.getName().isEmpty()) { + if (profile.getName() != null) { return Bukkit.getOfflinePlayer(profile.getName()); } }