From efd0c72baeb4041f75982baf4f2f0cc221730445 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sat, 22 Jun 2024 16:22:30 +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 --- .../craftaro/skyblock/gui/coop/GuiCoop.java | 7 ++-- .../craftaro/skyblock/gui/wip/GuiBans.java | 7 ++-- .../com/craftaro/skyblock/menus/Bans.java | 21 +++-------- .../craftaro/skyblock/menus/Information.java | 37 +++++-------------- .../craftaro/skyblock/menus/Leaderboard.java | 33 +++-------------- .../craftaro/skyblock/menus/Levelling.java | 18 +++------ .../com/craftaro/skyblock/menus/Members.java | 21 +++-------- .../craftaro/skyblock/menus/Ownership.java | 6 +-- .../com/craftaro/skyblock/menus/Visit.java | 23 ++++-------- .../com/craftaro/skyblock/menus/Visitors.java | 21 +++-------- .../skyblock/menus/admin/Creator.java | 18 +++------ .../skyblock/menus/admin/Generator.java | 20 +++------- .../skyblock/menus/admin/Levelling.java | 19 +++------- 13 files changed, 68 insertions(+), 183 deletions(-) diff --git a/src/main/java/com/craftaro/skyblock/gui/coop/GuiCoop.java b/src/main/java/com/craftaro/skyblock/gui/coop/GuiCoop.java index b1d4c32d..656fd589 100644 --- a/src/main/java/com/craftaro/skyblock/gui/coop/GuiCoop.java +++ b/src/main/java/com/craftaro/skyblock/gui/coop/GuiCoop.java @@ -3,10 +3,8 @@ import com.craftaro.core.gui.AnvilGui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.TextUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; @@ -17,9 +15,10 @@ import com.craftaro.skyblock.playerdata.PlayerDataManager; import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.player.OfflinePlayer; +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.Bukkit; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; @@ -155,7 +154,7 @@ public void paint() { targetPlayerTexture = new String[]{null, null}; } } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); ItemMeta pheadmeta = phead.getItemMeta(); if (pheadmeta != null) { pheadmeta.setDisplayName(TextUtils.formatText(this.languageLoad.getString("Menu.Coop.Item.Coop.Displayname") diff --git a/src/main/java/com/craftaro/skyblock/gui/wip/GuiBans.java b/src/main/java/com/craftaro/skyblock/gui/wip/GuiBans.java index 432b8dd8..42cc4f09 100644 --- a/src/main/java/com/craftaro/skyblock/gui/wip/GuiBans.java +++ b/src/main/java/com/craftaro/skyblock/gui/wip/GuiBans.java @@ -2,20 +2,19 @@ import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.TextUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; import com.craftaro.skyblock.playerdata.PlayerDataManager; import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.player.OfflinePlayer; +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.Bukkit; import org.bukkit.ChatColor; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; @@ -119,7 +118,7 @@ public void paint() { // TODO Item to add ban } } - ItemStack is = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack is = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); ItemMeta im = is.getItemMeta(); if (im != null) { im.setDisplayName(this.languageLoad.getString("Menu.Bans.Item.Ban.Displayname") diff --git a/src/main/java/com/craftaro/skyblock/menus/Bans.java b/src/main/java/com/craftaro/skyblock/menus/Bans.java index 97c67daf..b143565d 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Bans.java +++ b/src/main/java/com/craftaro/skyblock/menus/Bans.java @@ -1,10 +1,8 @@ package com.craftaro.skyblock.menus; import com.craftaro.core.gui.AnvilGui; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; import com.craftaro.skyblock.island.IslandManager; @@ -16,6 +14,9 @@ import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -165,23 +166,13 @@ public void open(Player player) { int playerMenuPage = playerData.getPage(MenuType.BANS), nextEndIndex = islandBans.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullM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= XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Bans.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Bans.Item.Next.Displayname"), null, null, null, null), 7); } @@ -218,7 +209,7 @@ public void open(Player player) { targetPlayerTexture = new String[]{null, null}; } } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem( nInv.createItem(phead, plugin.formatText( diff --git a/src/main/java/com/craftaro/skyblock/menus/Information.java b/src/main/java/com/craftaro/skyblock/menus/Information.java index a2dc1107..552a3566 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Information.java +++ b/src/main/java/com/craftaro/skyblock/menus/Information.java @@ -1,9 +1,7 @@ package com.craftaro.skyblock.menus; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; import com.craftaro.skyblock.island.IslandManager; @@ -17,6 +15,9 @@ import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; import com.craftaro.skyblock.visit.Visit; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -343,24 +344,14 @@ public void open(Player player) { nextEndIndex = displayedMembers.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Information.Members.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Information.Members.Item.Next.Displayname"), null, null, null, null), 7); @@ -398,7 +389,7 @@ public void open(Player player) { } else { islandRole = configLoad.getString("Menu.Information.Members.Item.Member.Word.Owner"); } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem( nInv.createItem(phead, configLoad.getString("Menu.Information.Members.Item.Member.Displayname") @@ -494,24 +485,14 @@ public void open(Player player) { nextEndIndex = displayedVisitors.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Information.Visitors.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Information.Visitors.Item.Next.Displayname"), null, null, null, null), 7); @@ -541,7 +522,7 @@ public void open(Player player) { playerData = plugin.getPlayerDataManager().getPlayerData(targetPlayer.getUniqueId()); playerTexture = playerData.getTexture(); } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem( nInv.createItem(phead, configLoad.getString("Menu.Information.Visitors.Item.Visitor.Displayname") diff --git a/src/main/java/com/craftaro/skyblock/menus/Leaderboard.java b/src/main/java/com/craftaro/skyblock/menus/Leaderboard.java index a325d59a..d6d85e5a 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Leaderboard.java +++ b/src/main/java/com/craftaro/skyblock/menus/Leaderboard.java @@ -8,9 +8,11 @@ import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; import com.craftaro.skyblock.visit.Visit; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -18,7 +20,6 @@ import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.SkullMeta; import java.util.ArrayList; import java.util.List; @@ -26,19 +27,6 @@ public class Leaderboard { private static Leaderboard instance; - private static final String[] steveSkinTexture = new String[]{ - "otpbxDm9B+opW7jEzZF8BVDeZSqaqdF0dyLlnlyMh7Q5ysJFDL48/9J/IOHp8JqNm1oarmVdvxrroy9dlNI2Mz4BVuJM2pcCOJwk2h+aZ4dzNZGxst+MYNPSw+i4sMoYu7OV07UVHrQffolFF7MiaBUst1hFwM07IpTE6UtIQz4rqWisXe9Iz5+ooqX4wj0IB3dPntsh6u5nVlL8acWCBDAW4YqcPt2Y4CKK+KtskjzusjqGAdEO+4lRcW1S0ldo2RNtUHEzZADWQcADjg9KKiKq9QIpIpYURIoIAA+pDGb5Q8L5O6CGI+i1+FxqXbgdBvcm1EG0OPdw9WpSqAxGGeXSwlzjILvlvBzYbd6gnHFBhFO+X7iwRJYNd+qQakjUa6ZwR8NbkpbN3ABb9+6YqVkabaEmgfky3HdORE+bTp/AT6LHqEMQo0xdNkvF9gtFci7RWhFwuTLDvQ1esby1IhlgT+X32CPuVHuxEvPCjN7+lmRz2OyOZ4REo2tAIFUKakqu3nZ0NcF98b87wAdA9B9Qyd2H/rEtUToQhpBjP732Sov6TlJkb8echGYiLL5bu/Q7hum72y4+j2GNnuRiOJtJidPgDqrYMg81GfenfPyS6Ynw6KhdEhnwmJ1FJlJhYvXZyqZwLAV1c26DN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CeI3zsQs8PqIBjUL4mO6VQT4lzHy0e3M61Xsdd8S1GtsakSetTvEtMdUwCEDfBA5PRRTLOVYTY+g=", - "ewogICJ0aW1lc3RhbXAiIDogMTYyMTcxNTQ5ODM0MywKICAicHJvZmlsZUlkIiA6ICIxYTc1ZTNiYmI1NTk0MTc2OTVjMmY4NTY1YzNlMDAzZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJUZXJvZmFyIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzNiNjBhMWY2ZDU2MmY1MmFhZWJiZjE0MzRmMWRlMTQ3OTMzYTNhZmZlMGU3NjRmYTQ5ZWEwNTc1MzY2MjNjZDMiLAogICAgICAibWV0YWRhdGEiIDogewogICAgICAgICJtb2RlbCIgOiAic2xpbSIKICAgICAgfQogICAgfQogIH0KfQ==" - }; - private static final String[] questionMarkSkinTexture = new String[]{ - "gi+wnQt/y4Z6E9rn65iDWmt8vUOM2WXY66XvtydqDJZTzwgFrjVcx2c5YwdzvtOIRtiX2nZt4n2uWesUFKb59xS24YWbxCDXnalHhCpPFcIP58SQbCm9AYp3UPzkcRNWzuV4BddrS608QQZGyIFOUaLPOPasGITZu51VLcOKcTyFOCKu1QE2yRo1orTH8bWfdpE769BB/VYGdny0qJtm1amc12wGiVifMJRutZmYo2ZdA0APhIJVaNsPppNESVcbeBCvk60l4QK43C/p98/QEe5U6UJ6Z6N01pBQcswubMu8lCuPLasep+vX3v2K+Ui9jnTQNreGNIZPWVjf6V1GH4xMbbUVQJsoPdcaXG855VdzyoW+kyHdWYEojSn0qAY/moH6JCLnx6PLCv9mITSvOIUHq8ITet0M7Z9KALY5s6eg6VdA8TvClRy2TTm9tIRt//TJo5JxBoTYujawGNSR7ryODj2UEDQ2xOyWSagxAXZpispdrO5jHxRmBZUwX9vxnAp+CNWxifpu9sINJTlqYsT/KlGOJQC483gv5B6Nm5VBB1DRFmQkohzO6Wc2eDixgEbaU795GlLxrNaFfNjVH6Bwr1e7df2H3nE0P0bexs4wYdWplijn4gPyHwjT2LDBPGFQK3Vo2SlaXfPYbkIHX21c9qaz3eWHpLEXUBQfnWc=", - "eyJ0aW1lc3RhbXAiOjE1MzE3MTcxNjY3MDAsInByb2ZpbGVJZCI6IjYwNmUyZmYwZWQ3NzQ4NDI5ZDZjZTFkMzMyMWM3ODM4IiwicHJvZmlsZU5hbWUiOiJNSEZfUXVlc3Rpb24iLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2QzNGUwNjNjYWZiNDY3YTVjOGRlNDNlYzc4NjE5Mzk5ZjM2OWY0YTUyNDM0ZGE4MDE3YTk4M2NkZDkyNTE2YTAifX19" - }; - public static Leaderboard getInstance() { if (instance == null) { instance = new Leaderboard(); @@ -301,15 +289,7 @@ public void open(Player player) { } } - if (playerTexture[0] == null || playerTexture[1] == null) { - if ((visit.getOwnerUUID().hashCode() & 1) != 0) { - playerTexture = alexSkinTexture; - } else { - playerTexture = steveSkinTexture; - } - } - - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem( nInv.createItem(phead, configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Island.Displayname") @@ -332,10 +312,7 @@ public void open(Player player) { for (int i = 0; i < itemSlots.length; i++) { if (!nInv.getItems().containsKey(itemSlots[i])) { - ItemStack qhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta qskullMeta = (SkullMeta) qhead.getItemMeta(); - SkullUtils.setSkullBase64(qskullMeta,questionMarkSkinTexture[1],questionMarkSkinTexture[0]); - qhead.setItemMeta(qskullMeta); + ItemStack qhead = XSkull.createItem().profile(new Profileable.StringProfileable("d34e063cafb467a5c8de43ec78619399f369f4a52434da8017a983cdd92516a0", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(qhead, configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Empty.Displayname") .replace("%position", "" + (i + 1)), diff --git a/src/main/java/com/craftaro/skyblock/menus/Levelling.java b/src/main/java/com/craftaro/skyblock/menus/Levelling.java index 4bca397f..65fccb6b 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Levelling.java +++ b/src/main/java/com/craftaro/skyblock/menus/Levelling.java @@ -2,7 +2,6 @@ import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.compatibility.ServerVersion; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; import com.craftaro.core.utils.ItemUtils; @@ -23,6 +22,9 @@ import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.NumberUtil; import com.craftaro.skyblock.utils.item.nInventoryUtil; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -225,23 +227,13 @@ public void open(Player player) { nInv.addItem(nInv.createItem(XMaterial.BLACK_STAINED_GLASS_PANE.parseItem(), configLoad.getString("Menu.Levelling.Item.Barrier.Displayname"), null, null, null, null), 9, 10, 11, 12, 13, 14, 15, 16, 17); if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Levelling.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Levelling.Item.Next.Displayname"), null, null, null, null), 7); } diff --git a/src/main/java/com/craftaro/skyblock/menus/Members.java b/src/main/java/com/craftaro/skyblock/menus/Members.java index 35eabc56..86f81b61 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Members.java +++ b/src/main/java/com/craftaro/skyblock/menus/Members.java @@ -1,9 +1,7 @@ package com.craftaro.skyblock.menus; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.config.FileManager; import com.craftaro.skyblock.island.Island; @@ -18,6 +16,9 @@ import com.craftaro.skyblock.utils.StringUtil; import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -353,23 +354,13 @@ public void open(Player player, Members.Type type, Members.Sort sort) { 9, 10, 11, 12, 13, 14, 15, 16, 17); if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Members.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Members.Item.Next.Displayname"), null, null, null, null), 7); } @@ -572,7 +563,7 @@ public void open(Player player, Members.Type type, Members.Sort sort) { } } - ItemStack phead = SkullUtils.getSkull(Bukkit.getPlayerUniqueId(playerName)); + ItemStack phead = XSkull.createItem().profile(new Profileable.UsernameProfileable(playerName)).apply(); nInv.addItem( nInv.createItem(phead, configLoad.getString("Menu.Members.Item.Member.Displayname").replace("%player", diff --git a/src/main/java/com/craftaro/skyblock/menus/Ownership.java b/src/main/java/com/craftaro/skyblock/menus/Ownership.java index 9dc7464f..f6ce1980 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Ownership.java +++ b/src/main/java/com/craftaro/skyblock/menus/Ownership.java @@ -1,10 +1,8 @@ package com.craftaro.skyblock.menus; import com.craftaro.core.gui.AnvilGui; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; import com.craftaro.skyblock.island.IslandManager; @@ -16,6 +14,8 @@ import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; +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.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -225,7 +225,7 @@ public void open(Player player) { originalOwnerName = targetPlayer.getName(); playerTexture = playerDataManager.getPlayerData(targetPlayer.getUniqueId()).getTexture(); } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem(nInv.createItem(XMaterial.OAK_FENCE_GATE.parseItem(), configLoad.getString("Menu.Ownership.Item.Exit.Displayname"), null, null, null, null), 0); nInv.addItem(nInv.createItem(phead, diff --git a/src/main/java/com/craftaro/skyblock/menus/Visit.java b/src/main/java/com/craftaro/skyblock/menus/Visit.java index 7d735acf..57b8c155 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Visit.java +++ b/src/main/java/com/craftaro/skyblock/menus/Visit.java @@ -1,9 +1,7 @@ package com.craftaro.skyblock.menus; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.NumberUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.api.event.player.PlayerVoteEvent; @@ -21,6 +19,9 @@ import com.craftaro.skyblock.utils.item.nInventoryUtil; import com.craftaro.skyblock.utils.player.OfflinePlayer; import com.craftaro.skyblock.visit.VisitManager; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -355,23 +356,13 @@ public void open(Player player, Visit.Type type, Visit.Sort sort) { 9, 10, 11, 12, 13, 14, 15, 16, 17); if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Visit.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Visit.Item.Next.Displayname"), null, null, null, null), 7); } @@ -476,7 +467,7 @@ public void open(Player player, Visit.Type type, Visit.Sort sort) { "Menu.Visit.Item.Island.Vote.Enabled.Signature.Disabled.Visitor.Lore")); } } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem(nInv.createItem(phead, configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player", targetPlayerName), @@ -512,7 +503,7 @@ public void open(Player player, Visit.Type type, Visit.Sort sort) { itemLore.addAll(configLoad .getStringList("Menu.Visit.Item.Island.Vote.Disabled.Signature.Disabled.Lore")); } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem(nInv.createItem(phead, configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player", targetPlayerName), diff --git a/src/main/java/com/craftaro/skyblock/menus/Visitors.java b/src/main/java/com/craftaro/skyblock/menus/Visitors.java index ff5a8d71..bf15d6cc 100644 --- a/src/main/java/com/craftaro/skyblock/menus/Visitors.java +++ b/src/main/java/com/craftaro/skyblock/menus/Visitors.java @@ -1,9 +1,7 @@ package com.craftaro.skyblock.menus; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.island.Island; import com.craftaro.skyblock.island.IslandManager; @@ -15,6 +13,9 @@ import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.NumberUtil; import com.craftaro.skyblock.utils.item.nInventoryUtil; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -189,23 +190,13 @@ public void open(Player player) { int playerMenuPage = playerData.getPage(MenuType.VISITORS), nextEndIndex = sortedIslandVisitors.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMe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XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Visitors.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Visitors.Item.Next.Displayname"), null, null, null, null), 7); } @@ -282,7 +273,7 @@ public void open(Player player) { "Menu.Visitors.Item.Visitor.Kick.NoPermission.Ban.NoPermission.Lore")); } } - ItemStack phead = SkullUtils.getSkull(targetPlayer.getUniqueId()); + ItemStack phead = XSkull.createItem().profile(new Profileable.OfflinePlayerProfileable(targetPlayer)).apply(); nInv.addItem( nInv.createItem(phead, ChatColor.translateAlternateColorCodes('&', diff --git a/src/main/java/com/craftaro/skyblock/menus/admin/Creator.java b/src/main/java/com/craftaro/skyblock/menus/admin/Creator.java index ca46baf2..3f08ecd8 100644 --- a/src/main/java/com/craftaro/skyblock/menus/admin/Creator.java +++ b/src/main/java/com/craftaro/skyblock/menus/admin/Creator.java @@ -3,7 +3,6 @@ import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.gui.AnvilGui; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; import com.craftaro.core.utils.ItemUtils; @@ -19,6 +18,9 @@ import com.craftaro.skyblock.structure.Structure; import com.craftaro.skyblock.structure.StructureManager; import com.craftaro.skyblock.utils.item.nInventoryUtil; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.configuration.file.FileConfiguration; @@ -80,24 +82,14 @@ public void open(Player player) { int playerMenuPage = playerData.getPage(MenuType.ADMIN_CREATOR), nextEndIndex = structures.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Admin.Creator.Browse.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Admin.Creator.Browse.Item.Next.Displayname"), null, null, null, null), 7); diff --git a/src/main/java/com/craftaro/skyblock/menus/admin/Generator.java b/src/main/java/com/craftaro/skyblock/menus/admin/Generator.java index 1420598c..6c6034a7 100644 --- a/src/main/java/com/craftaro/skyblock/menus/admin/Generator.java +++ b/src/main/java/com/craftaro/skyblock/menus/admin/Generator.java @@ -3,10 +3,8 @@ import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.gui.AnvilGui; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.config.FileManager; import com.craftaro.skyblock.config.FileManager.Config; @@ -19,6 +17,9 @@ import com.craftaro.skyblock.playerdata.PlayerData; import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.item.nInventoryUtil; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -31,7 +32,6 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.inventory.meta.SkullMeta; import java.io.File; import java.io.IOException; @@ -80,24 +80,14 @@ public void open(Player player) { int playerMenuPage = playerData.getPage(MenuType.ADMIN_GENERATOR), nextEndIndex = generators.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (SkullMeta) Lhead.getItemMeta(); - SkullUtils.setSkullBase64(LskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ==", - "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Admin.Generator.Browse.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (Skull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PI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Admin.Generator.Browse.Item.Next.Displayname"), null, null, null, null), 7); diff --git a/src/main/java/com/craftaro/skyblock/menus/admin/Levelling.java b/src/main/java/com/craftaro/skyblock/menus/admin/Levelling.java index 7cd344cf..e9230b3a 100644 --- a/src/main/java/com/craftaro/skyblock/menus/admin/Levelling.java +++ b/src/main/java/com/craftaro/skyblock/menus/admin/Levelling.java @@ -3,10 +3,8 @@ import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.gui.AnvilGui; -import com.craftaro.third_party.com.cryptomorin.xseries.SkullUtils; import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.third_party.com.cryptomorin.xseries.XSound; -import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.NumberUtils; import com.craftaro.skyblock.SkyBlock; import com.craftaro.skyblock.config.FileManager; @@ -19,6 +17,9 @@ import com.craftaro.skyblock.playerdata.PlayerData; import com.craftaro.skyblock.sound.SoundManager; import com.craftaro.skyblock.utils.item.nInventoryUtil; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.builder.XSkull; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.ProfileInputType; +import com.craftaro.third_party.com.cryptomorin.xseries.profiles.objects.Profileable; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -105,23 +106,13 @@ public void open(Player player) { int playerMenuPage = playerData.getPage(MenuType.ADMIN_LEVELLING), nextEndIndex = levellingMaterials.size() - playerMenuPage * 36; if (playerMenuPage != 1) { - ItemStack Lhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta LskullMeta = (S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Z0sP+k="); - Lhead.setItemMeta(LskullMeta); + ItemStack Lhead = XSkull.createItem().profile(new Profileable.StringProfileable("3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Lhead, configLoad.getString("Menu.Admin.Levelling.Item.Previous.Displayname"), null, null, null, null), 1); } if (!(nextEndIndex == 0 || nextEndIndex < 0)) { - ItemStack Rhead = XMaterial.PLAYER_HEAD.parseItem(); - SkullMeta RskullMeta = (SkullMeta) Rhead.getItemMeta(); - SkullUtils.setSkullBase64(RskullMeta, - "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ==", - "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8="); - Rhead.setItemMeta(RskullMeta); + ItemStack Rhead = XSkull.createItem().profile(new Profileable.StringProfileable("1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b", ProfileInputType.TEXTURE_HASH)).apply(); nInv.addItem(nInv.createItem(Rhead, configLoad.getString("Menu.Admin.Levelling.Item.Next.Displayname"), null, null, null, null), 7); }