From 99eb5d9e542b7286634d450ea4af8dc6582b6b1c Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sat, 22 Jun 2024 15:52:38 +0200 Subject: [PATCH] fix: replace usage of deleted SkullUtils class with XSkull Updating the Core also updated XSeries which got rid of SkullUtils in favor of new methods in XSkull --- .../epicvouchers/libraries/inventory/PlayersMenu.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/craftaro/epicvouchers/libraries/inventory/PlayersMenu.java b/src/main/java/com/craftaro/epicvouchers/libraries/inventory/PlayersMenu.java index b9bfb00..23cf037 100644 --- a/src/main/java/com/craftaro/epicvouchers/libraries/inventory/PlayersMenu.java +++ b/src/main/java/com/craftaro/epicvouchers/libraries/inventory/PlayersMenu.java @@ -1,11 +1,12 @@ package com.craftaro.epicvouchers.libraries.inventory; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; -import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.epicvouchers.EpicVouchers; import com.craftaro.epicvouchers.libraries.ItemBuilder; import com.craftaro.epicvouchers.menus.ActionMenu; import com.craftaro.epicvouchers.voucher.Voucher; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -53,7 +54,7 @@ public abstract class PlayersMenu extends FastInv { Player player = this.players.get(index); - ItemStack itemStack = SkullUtils.getSkull(player.getUniqueId()); + ItemStack itemStack = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(player)).apply(); ItemMeta itemMeta = itemStack.getItemMeta(); itemMeta.setDisplayName(YELLOW + player.getName());