Skip to content

Commit

Permalink
Fix ItemBuilder#skull
Browse files Browse the repository at this point in the history
  • Loading branch information
Almighty-Satan committed Sep 8, 2024
1 parent 5d53deb commit 532491f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/de/varoplugin/cfw/item/ItemBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static ItemBuilder itemStack(ItemStack itemStack) {

public static ItemBuilder skull(UUID uuid) {
if (VersionUtils.getVersion().isLowerThan(ServerVersion.ONE_12))
return skull(uuid.toString());
throw new UnsupportedOperationException("Not available on Minecraft versions < 1.12");
return SkullBuilderImpl.uuid(uuid);
}

Expand All @@ -99,6 +99,8 @@ public static ItemBuilder skull(String name) {
}

public static ItemBuilder skull(Player player) {
if (VersionUtils.getVersion().isLowerThan(ServerVersion.ONE_12))
return skull(player.getName());
return skull(player.getUniqueId());
}
}

0 comments on commit 532491f

Please sign in to comment.