invalid skull = null

This commit is contained in:
jascotty2 2019-09-09 10:19:15 -05:00
parent 5505bf7d8c
commit c9231fa07c

View File

@ -312,7 +312,7 @@ public class ItemUtils {
public static String getSkullTexture(Player player) { public static String getSkullTexture(Player player) {
if (player == null || ServerVersion.isServerVersionBelow(ServerVersion.V1_8)) { if (player == null || ServerVersion.isServerVersionBelow(ServerVersion.V1_8)) {
return ""; return null;
} }
try { try {
@ -340,7 +340,7 @@ public class ItemUtils {
public static String getSkullTexture(ItemStack item) { public static String getSkullTexture(ItemStack item) {
if (cb_SkullMeta_profile == null || !CompatibleMaterial.PLAYER_HEAD.matches(item) || ServerVersion.isServerVersionBelow(ServerVersion.V1_8)) { if (cb_SkullMeta_profile == null || !CompatibleMaterial.PLAYER_HEAD.matches(item) || ServerVersion.isServerVersionBelow(ServerVersion.V1_8)) {
return ""; return null;
} }
try { try {
SkullMeta localSkullMeta = (SkullMeta) item.getItemMeta(); SkullMeta localSkullMeta = (SkullMeta) item.getItemMeta();
@ -350,7 +350,7 @@ public class ItemUtils {
return iterator.hasNext() ? iterator.next().getValue() : null; return iterator.hasNext() ? iterator.next().getValue() : null;
} catch (IllegalArgumentException | IllegalAccessException ex) { } catch (IllegalArgumentException | IllegalAccessException ex) {
} }
return ""; return null;
} }
public static String getDecodedTexture(String encoded) { public static String getDecodedTexture(String encoded) {