Let's use the Head API in SongodaCore.

This commit is contained in:
Brianna 2021-06-01 15:01:51 -05:00
parent bfdcc649a2
commit fc3edb3468
14 changed files with 55 additions and 139 deletions

View File

@ -5,6 +5,7 @@ import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.gui.AnvilGui; import com.songoda.core.gui.AnvilGui;
import com.songoda.core.gui.Gui; import com.songoda.core.gui.Gui;
import com.songoda.core.gui.GuiUtils; import com.songoda.core.gui.GuiUtils;
import com.songoda.core.utils.ItemUtils;
import com.songoda.core.utils.TextUtils; import com.songoda.core.utils.TextUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
@ -14,7 +15,6 @@ import com.songoda.skyblock.message.MessageManager;
import com.songoda.skyblock.permission.PermissionManager; import com.songoda.skyblock.permission.PermissionManager;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
@ -155,7 +155,7 @@ public class GuiCoop extends Gui {
} }
} }
ItemStack is = SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]); ItemStack is = ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]);
ItemMeta im = is.getItemMeta(); ItemMeta im = is.getItemMeta();
if (im != null) { if (im != null) {
im.setDisplayName(TextUtils.formatText(languageLoad.getString("Menu.Coop.Item.Coop.Displayname") im.setDisplayName(TextUtils.formatText(languageLoad.getString("Menu.Coop.Item.Coop.Displayname")

View File

@ -4,12 +4,12 @@ import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.gui.Gui; import com.songoda.core.gui.Gui;
import com.songoda.core.gui.GuiUtils; import com.songoda.core.gui.GuiUtils;
import com.songoda.core.utils.ItemUtils;
import com.songoda.core.utils.TextUtils; import com.songoda.core.utils.TextUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -113,7 +113,7 @@ public class GuiBans extends Gui {
} }
} }
ItemStack is = SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]); ItemStack is = ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]);
ItemMeta im = is.getItemMeta(); ItemMeta im = is.getItemMeta();
if(im != null){ if(im != null){
im.setDisplayName(languageLoad.getString("Menu.Bans.Item.Ban.Displayname") im.setDisplayName(languageLoad.getString("Menu.Bans.Item.Ban.Displayname")

View File

@ -2,9 +2,9 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.island.IslandManager; import com.songoda.skyblock.island.IslandManager;
import com.songoda.skyblock.island.IslandRole; import com.songoda.skyblock.island.IslandRole;
@ -14,7 +14,6 @@ import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.AbstractAnvilGUI; import com.songoda.skyblock.utils.AbstractAnvilGUI;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -25,7 +24,6 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import java.io.File;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
@ -122,7 +120,7 @@ public class Bans {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta())) { } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(plugin.formatText( if (is.getItemMeta().getDisplayName().equals(plugin.formatText(
configLoad.getString("Menu.Bans.Item.Previous.Displayname")))) { configLoad.getString("Menu.Bans.Item.Previous.Displayname")))) {
playerData1.setPage(MenuType.BANS, playerData1.getPage(MenuType.BANS) - 1); playerData1.setPage(MenuType.BANS, playerData1.getPage(MenuType.BANS) - 1);
@ -173,14 +171,14 @@ public class Bans {
int playerMenuPage = playerData.getPage(MenuType.BANS), nextEndIndex = islandBans.size() - playerMenuPage * 36; int playerMenuPage = playerData.getPage(MenuType.BANS), nextEndIndex = islandBans.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k=", "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjj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ZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Bans.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Bans.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=", "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRX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dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Bans.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Bans.Item.Next.Displayname"), null, null, null, null), 7);
@ -220,7 +218,7 @@ public class Bans {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]),
plugin.formatText( plugin.formatText(
configLoad.getString("Menu.Bans.Item.Ban.Displayname") configLoad.getString("Menu.Bans.Item.Ban.Displayname")
.replace("%player", targetPlayerName == null ? "" : targetPlayerName)), .replace("%player", targetPlayerName == null ? "" : targetPlayerName)),

View File

@ -2,9 +2,9 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.island.IslandManager; import com.songoda.skyblock.island.IslandManager;
import com.songoda.skyblock.island.IslandRole; import com.songoda.skyblock.island.IslandRole;
@ -14,7 +14,6 @@ import com.songoda.skyblock.placeholder.Placeholder;
import com.songoda.skyblock.playerdata.PlayerData; import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import com.songoda.skyblock.visit.Visit; import com.songoda.skyblock.visit.Visit;
@ -26,7 +25,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -294,7 +292,7 @@ public class Information {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial())
&& (is.hasItemMeta())) { && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName() if (is.getItemMeta().getDisplayName()
.equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString( .equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString(
@ -356,7 +354,7 @@ public class Information {
nextEndIndex = displayedMembers.size() - playerMenuPage * 36; nextEndIndex = displayedMembers.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmH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ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k=",
"eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Information.Members.Item.Previous.Displayname"), null, null, configLoad.getString("Menu.Information.Members.Item.Previous.Displayname"), null, null,
@ -364,7 +362,7 @@ public class Information {
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw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xOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=",
"eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Information.Members.Item.Next.Displayname"), null, null, configLoad.getString("Menu.Information.Members.Item.Next.Displayname"), null, null,
@ -405,7 +403,7 @@ public class Information {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(playerTexture[0], playerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(playerTexture[0], playerTexture[1]),
configLoad.getString("Menu.Information.Members.Item.Member.Displayname") configLoad.getString("Menu.Information.Members.Item.Member.Displayname")
.replace("%player", playerName), .replace("%player", playerName),
configLoad.getStringList("Menu.Information.Members.Item.Member.Lore"), configLoad.getStringList("Menu.Information.Members.Item.Member.Lore"),
@ -453,7 +451,7 @@ public class Information {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial())
&& (is.hasItemMeta())) { && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName() if (is.getItemMeta().getDisplayName()
.equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString( .equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString(
@ -501,7 +499,7 @@ public class Information {
nextEndIndex = displayedVisitors.size() - playerMenuPage * 36; nextEndIndex = displayedVisitors.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDq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ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Information.Visitors.Item.Previous.Displayname"), null, null, configLoad.getString("Menu.Information.Visitors.Item.Previous.Displayname"), null, null,
@ -509,7 +507,7 @@ public class Information {
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FU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5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=",
"eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Information.Visitors.Item.Next.Displayname"), null, null, configLoad.getString("Menu.Information.Visitors.Item.Next.Displayname"), null, null,
@ -542,7 +540,7 @@ public class Information {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(playerTexture[0], playerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(playerTexture[0], playerTexture[1]),
configLoad.getString("Menu.Information.Visitors.Item.Visitor.Displayname") configLoad.getString("Menu.Information.Visitors.Item.Visitor.Displayname")
.replace("%player", playerName), .replace("%player", playerName),
null, null, null, null), null, null, null, null),

View File

@ -2,14 +2,12 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.placeholder.Placeholder; import com.songoda.skyblock.placeholder.Placeholder;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.core.utils.NumberUtils; import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import com.songoda.skyblock.visit.Visit; import com.songoda.skyblock.visit.Visit;
@ -21,7 +19,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -292,7 +289,7 @@ public class Leaderboard {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(playerTexture[0], playerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(playerTexture[0], playerTexture[1]),
configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Island.Displayname") configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Island.Displayname")
.replace( .replace(
"%owner", playerName) "%owner", playerName)
@ -313,7 +310,7 @@ public class Leaderboard {
for (int i = 0; i < itemSlots.length; i++) { for (int i = 0; i < itemSlots.length; i++) {
if (!nInv.getItems().containsKey(itemSlots[i])) { if (!nInv.getItems().containsKey(itemSlots[i])) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"gi+wnQt/y4Z6E9rn65iDWmt8vUOM2WXY66XvtydqDJZTzwgFrjVcx2c5YwdzvtOIRtiX2nZt4n2uWesUFKb59xS24YWbxCDXnalHhCpPFcIP58SQbCm9AYp3UPzkcRNWzuV4BddrS608QQZGyIFOUaLPOPasGITZu51VLcOKcTyFOCKu1QE2yRo1orTH8bWfdpE769BB/VYGdny0qJtm1amc12wGiVifMJRutZmYo2ZdA0APhIJVaNsPppNESVcbeBCvk60l4QK43C/p98/QEe5U6UJ6Z6N01pBQcswubMu8lCuPLasep+vX3v2K+Ui9jnTQNreGNIZPWVjf6V1GH4xMbbUVQJsoPdcaXG855VdzyoW+kyHdWYEojSn0qAY/moH6JCLnx6PLCv9mITSvOIUHq8ITet0M7Z9KALY5s6eg6VdA8TvClRy2TTm9tIRt//TJo5JxBoTYujawGNSR7ryODj2UEDQ2xOyWSagxAXZpispdrO5jHxRmBZUwX9vxnAp+CNWxifpu9sINJTlqYsT/KlGOJQC483gv5B6Nm5VBB1DRFmQkohzO6Wc2eDixgEbaU795GlLxrNaFfNjVH6Bwr1e7df2H3nE0P0bexs4wYdWplijn4gPyHwjT2LDBPGFQK3Vo2SlaXfPYbkIHX21c9qaz3eWHpLEXUBQfnWc=", "gi+wnQt/y4Z6E9rn65iDWmt8vUOM2WXY66XvtydqDJZTzwgFrjVcx2c5YwdzvtOIRtiX2nZt4n2uWesUFKb59xS24YWbxCDXnalHhCpPFcIP58SQbCm9AYp3UPzkcRNWzuV4BddrS608QQZGyIFOUaLPOPasGITZu51VLcOKcTyFOCKu1QE2yRo1orTH8bWfdpE769BB/V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V4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2QzNGUwNjNjYWZiNDY3YTVjOGRlNDNlYzc4NjE5Mzk5ZjM2OWY0YTUyNDM0ZGE4MDE3YTk4M2NkZDkyNTE2YTAifX19"),
configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Empty.Displayname") configLoad.getString("Menu.Leaderboard.Leaderboard.Item.Empty.Displayname")

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.cooldown.Cooldown; import com.songoda.skyblock.cooldown.Cooldown;
@ -19,7 +20,6 @@ import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.core.utils.NumberUtils; import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.NumberUtil; import com.songoda.skyblock.utils.NumberUtil;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.version.NMSUtil; import com.songoda.skyblock.utils.version.NMSUtil;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -140,7 +140,7 @@ public class Levelling {
cooldownManager.createPlayer(CooldownType.Levelling, Bukkit.getServer().getOfflinePlayer(island.getOwnerUUID())); cooldownManager.createPlayer(CooldownType.Levelling, Bukkit.getServer().getOfflinePlayer(island.getOwnerUUID()));
levellingManager.startScan(player, island); levellingManager.startScan(player, island);
}); });
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta())) { } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())) {
PlayerData playerData1 = plugin.getPlayerDataManager().getPlayerData(player); PlayerData playerData1 = plugin.getPlayerDataManager().getPlayerData(player);
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString("Menu.Levelling.Item.Previous.Displayname")))) { if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', configLoad.getString("Menu.Levelling.Item.Previous.Displayname")))) {
@ -216,14 +216,14 @@ public class Levelling {
nInv.addItem(nInv.createItem(CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem(), configLoad.getString("Menu.Levelling.Item.Barrier.Displayname"), null, null, null, null), 9, 10, 11, 12, 13, 14, 15, 16, 17); nInv.addItem(nInv.createItem(CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem(), configLoad.getString("Menu.Levelling.Item.Barrier.Displayname"), null, null, null, null), 9, 10, 11, 12, 13, 14, 15, 16, 17);
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54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lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Levelling.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Levelling.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQ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eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Levelling.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Levelling.Item.Next.Displayname"), null, null, null, null), 7);

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
@ -12,10 +13,8 @@ import com.songoda.skyblock.placeholder.Placeholder;
import com.songoda.skyblock.playerdata.PlayerData; import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.NumberUtil; import com.songoda.skyblock.utils.NumberUtil;
import com.songoda.skyblock.utils.StringUtil; import com.songoda.skyblock.utils.StringUtil;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -126,7 +125,7 @@ public class Members {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta())) { } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Members.Item.Previous.Displayname")))) { configLoad.getString("Menu.Members.Item.Previous.Displayname")))) {
playerData.setPage(MenuType.MEMBERS, playerData.getPage(MenuType.MEMBERS) - 1); playerData.setPage(MenuType.MEMBERS, playerData.getPage(MenuType.MEMBERS) - 1);
@ -348,14 +347,14 @@ public class Members {
9, 10, 11, 12, 13, 14, 15, 16, 17); 9, 10, 11, 12, 13, 14, 15, 16, 17);
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustom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Tw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k=",
"eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Members.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Members.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=", "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVC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vMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Members.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Members.Item.Next.Displayname"), null, null, null, null), 7);
@ -560,7 +559,7 @@ public class Members {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(playerTexture[0], playerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(playerTexture[0], playerTexture[1]),
configLoad.getString("Menu.Members.Item.Member.Displayname").replace("%player", configLoad.getString("Menu.Members.Item.Member.Displayname").replace("%player",
playerName), playerName),
itemLore, itemLore,

View File

@ -2,8 +2,8 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.island.IslandManager; import com.songoda.skyblock.island.IslandManager;
import com.songoda.skyblock.island.IslandRole; import com.songoda.skyblock.island.IslandRole;
@ -13,7 +13,6 @@ import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.AbstractAnvilGUI; import com.songoda.skyblock.utils.AbstractAnvilGUI;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -26,7 +25,6 @@ import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import java.io.File;
import java.util.UUID; import java.util.UUID;
public class Ownership { public class Ownership {
@ -81,7 +79,7 @@ public class Ownership {
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', && (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Ownership.Item.Exit.Displayname"))))) { configLoad.getString("Menu.Ownership.Item.Exit.Displayname"))))) {
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1.0F, 1.0F); soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1.0F, 1.0F);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta()) } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())
&& (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', && (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Ownership.Item.Original.Displayname"))))) { configLoad.getString("Menu.Ownership.Item.Original.Displayname"))))) {
soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F); soundManager.playSound(player, CompatibleSound.ENTITY_VILLAGER_YES.getSound(), 1.0F, 1.0F);
@ -248,7 +246,7 @@ public class Ownership {
nInv.addItem(nInv.createItem(CompatibleMaterial.OAK_FENCE_GATE.getItem(), nInv.addItem(nInv.createItem(CompatibleMaterial.OAK_FENCE_GATE.getItem(),
configLoad.getString("Menu.Ownership.Item.Exit.Displayname"), null, null, null, null), 0); configLoad.getString("Menu.Ownership.Item.Exit.Displayname"), null, null, null, null), 0);
nInv.addItem(nInv.createItem(SkullUtil.create(playerTexture[0], playerTexture[1]), nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(playerTexture[0], playerTexture[1]),
configLoad.getString("Menu.Ownership.Item.Original.Displayname"), configLoad.getString("Menu.Ownership.Item.Original.Displayname"),
configLoad.getStringList("Menu.Ownership.Item.Original.Lore"), configLoad.getStringList("Menu.Ownership.Item.Original.Lore"),
new Placeholder[]{new Placeholder("%player", originalOwnerName)}, null, null), 1); new Placeholder[]{new Placeholder("%player", originalOwnerName)}, null, null), 1);

View File

@ -2,10 +2,10 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.api.event.player.PlayerVoteEvent; import com.songoda.skyblock.api.event.player.PlayerVoteEvent;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.island.IslandManager; import com.songoda.skyblock.island.IslandManager;
import com.songoda.skyblock.island.IslandRole; import com.songoda.skyblock.island.IslandRole;
@ -17,7 +17,6 @@ import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.core.utils.NumberUtils; import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.StringUtil; import com.songoda.skyblock.utils.StringUtil;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.player.OfflinePlayer; import com.songoda.skyblock.utils.player.OfflinePlayer;
import com.songoda.skyblock.visit.VisitManager; import com.songoda.skyblock.visit.VisitManager;
@ -29,7 +28,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.*; import java.util.*;
public class Visit { public class Visit {
@ -116,7 +114,7 @@ public class Visit {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta())) { } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Visit.Item.Previous.Displayname")))) { configLoad.getString("Menu.Visit.Item.Previous.Displayname")))) {
playerData.setPage(MenuType.VISIT, playerData.getPage(MenuType.VISIT) - 1); playerData.setPage(MenuType.VISIT, playerData.getPage(MenuType.VISIT) - 1);
@ -363,14 +361,14 @@ public class Visit {
9, 10, 11, 12, 13, 14, 15, 16, 17); 9, 10, 11, 12, 13, 14, 15, 16, 17);
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUu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JZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Visit.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Visit.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRR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kIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=",
"eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Visit.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Visit.Item.Next.Displayname"), null, null, null, null), 7);
@ -477,7 +475,7 @@ public class Visit {
} }
} }
nInv.addItem(nInv.createItem(SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]), nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]),
configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player", configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player",
targetPlayerName), targetPlayerName),
itemLore, itemLore,
@ -513,7 +511,7 @@ public class Visit {
.getStringList("Menu.Visit.Item.Island.Vote.Disabled.Signature.Disabled.Lore")); .getStringList("Menu.Visit.Item.Island.Vote.Disabled.Signature.Disabled.Lore"));
} }
nInv.addItem(nInv.createItem(SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]), nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]),
configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player", configLoad.getString("Menu.Visit.Item.Island.Displayname").replace("%player",
targetPlayerName), targetPlayerName),
itemLore, itemLore,

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.island.Island; import com.songoda.skyblock.island.Island;
@ -12,9 +13,7 @@ import com.songoda.skyblock.placeholder.Placeholder;
import com.songoda.skyblock.playerdata.PlayerData; import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.playerdata.PlayerDataManager; import com.songoda.skyblock.playerdata.PlayerDataManager;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.NumberUtil; import com.songoda.skyblock.utils.NumberUtil;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -24,7 +23,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.*; import java.util.*;
public class Visitors { public class Visitors {
@ -91,7 +89,7 @@ public class Visitors {
event.setWillClose(false); event.setWillClose(false);
event.setWillDestroy(false); event.setWillDestroy(false);
} else if ((is.getType() == SkullUtil.createItemStack().getType()) && (is.hasItemMeta())) { } else if ((is.getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial()) && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Visitors.Item.Previous.Displayname")))) { configLoad.getString("Menu.Visitors.Item.Previous.Displayname")))) {
playerData.setPage(MenuType.VISITORS, playerData.getPage(MenuType.VISITORS) - 1); playerData.setPage(MenuType.VISITORS, playerData.getPage(MenuType.VISITORS) - 1);
@ -188,14 +186,14 @@ public class Visitors {
int playerMenuPage = playerData.getPage(MenuType.VISITORS), nextEndIndex = sortedIslandVisitors.size() - playerMenuPage * 36; int playerMenuPage = playerData.getPage(MenuType.VISITORS), nextEndIndex = sortedIslandVisitors.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2l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N6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k=",
"eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Visitors.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Visitors.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJP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aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=",
"eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Visitors.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Visitors.Item.Next.Displayname"), null, null, null, null), 7);
@ -275,7 +273,7 @@ public class Visitors {
} }
nInv.addItem( nInv.addItem(
nInv.createItem(SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]), nInv.createItem(ItemUtils.getCustomHead(targetPlayerTexture[0], targetPlayerTexture[1]),
ChatColor.translateAlternateColorCodes('&', ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Visitors.Item.Visitor.Displayname") configLoad.getString("Menu.Visitors.Item.Visitor.Displayname")
.replace("%player", targetPlayer.getName())), .replace("%player", targetPlayer.getName())),

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus.admin;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config; import com.songoda.skyblock.config.FileManager.Config;
@ -14,7 +15,6 @@ import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.structure.Structure; import com.songoda.skyblock.structure.Structure;
import com.songoda.skyblock.structure.StructureManager; import com.songoda.skyblock.structure.StructureManager;
import com.songoda.skyblock.utils.AbstractAnvilGUI; import com.songoda.skyblock.utils.AbstractAnvilGUI;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.version.NMSUtil; import com.songoda.skyblock.utils.version.NMSUtil;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -78,7 +78,7 @@ public class Creator implements Listener {
int playerMenuPage = playerData.getPage(MenuType.ADMIN_CREATOR), nextEndIndex = structures.size() - playerMenuPage * 36; int playerMenuPage = playerData.getPage(MenuType.ADMIN_CREATOR), nextEndIndex = structures.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem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, configLoad.getString("Menu.Admin.Creator.Browse.Item.Previous.Displayname"), null, null, null,
@ -86,7 +86,7 @@ public class Creator implements Listener {
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=", "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGok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InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Admin.Creator.Browse.Item.Next.Displayname"), null, null, null, configLoad.getString("Menu.Admin.Creator.Browse.Item.Next.Displayname"), null, null, null,

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus.admin;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config; import com.songoda.skyblock.config.FileManager.Config;
@ -14,7 +15,6 @@ import com.songoda.skyblock.placeholder.Placeholder;
import com.songoda.skyblock.playerdata.PlayerData; import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.AbstractAnvilGUI; import com.songoda.skyblock.utils.AbstractAnvilGUI;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.version.NMSUtil; import com.songoda.skyblock.utils.version.NMSUtil;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -78,7 +78,7 @@ public class Generator implements Listener {
int playerMenuPage = playerData.getPage(MenuType.ADMIN_GENERATOR), nextEndIndex = generators.size() - playerMenuPage * 36; int playerMenuPage = playerData.getPage(MenuType.ADMIN_GENERATOR), nextEndIndex = generators.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6zG7DxspS6ew/rZ8E809Xe0ArllquIZ0sP+k=", "ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVD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String("Menu.Admin.Generator.Browse.Item.Previous.Displayname"), null, null, null, configLoad.getString("Menu.Admin.Generator.Browse.Item.Previous.Displayname"), null, null, null,
@ -86,7 +86,7 @@ public class Generator implements Listener {
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2lc7aAZiax67MFw55pDtgfpl+Nlum4r7CK2w5Xob2QTCovVhu78/6SV7qM2Lhlwx/Sjqcl8rn5UIoyM49QE5Iyf1tk+xHXkIvY0m7q358oXsfca4eKmxMe6DFRjUDo1VuWxdg9iVjn22flqz1LD1FhGlPoqv0k4jX5Q733LwtPPI6VOTK+QzqrmiuR6e8=", "wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLp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p0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Admin.Generator.Browse.Item.Next.Displayname"), null, null, null, configLoad.getString("Menu.Admin.Generator.Browse.Item.Next.Displayname"), null, null, null,
@ -384,7 +384,7 @@ public class Generator implements Listener {
return; return;
} }
} else if ((event.getCurrentItem().getType() == SkullUtil.createItemStack().getType()) } else if ((event.getCurrentItem().getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial())
&& (is.hasItemMeta())) { && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Admin.Generator.Browse.Item.Previous.Displayname")))) { configLoad.getString("Menu.Admin.Generator.Browse.Item.Previous.Displayname")))) {

View File

@ -2,6 +2,7 @@ package com.songoda.skyblock.menus.admin;
import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.utils.ItemUtils;
import com.songoda.skyblock.SkyBlock; import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager; import com.songoda.skyblock.config.FileManager;
import com.songoda.skyblock.config.FileManager.Config; import com.songoda.skyblock.config.FileManager.Config;
@ -14,7 +15,6 @@ import com.songoda.skyblock.playerdata.PlayerData;
import com.songoda.skyblock.sound.SoundManager; import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.AbstractAnvilGUI; import com.songoda.skyblock.utils.AbstractAnvilGUI;
import com.songoda.core.utils.NumberUtils; import com.songoda.core.utils.NumberUtils;
import com.songoda.skyblock.utils.item.SkullUtil;
import com.songoda.skyblock.utils.item.nInventoryUtil; import com.songoda.skyblock.utils.item.nInventoryUtil;
import com.songoda.skyblock.utils.version.NMSUtil; import com.songoda.skyblock.utils.version.NMSUtil;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@ -97,14 +97,14 @@ public class Levelling implements Listener {
int playerMenuPage = playerData.getPage(MenuType.ADMIN_LEVELLING), nextEndIndex = levellingMaterials.size() - playerMenuPage * 36; int playerMenuPage = playerData.getPage(MenuType.ADMIN_LEVELLING), nextEndIndex = levellingMaterials.size() - playerMenuPage * 36;
if (playerMenuPage != 1) { if (playerMenuPage != 1) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"ToR1w9ZV7zpzCiLBhoaJH3uixs5mAlMhNz42oaRRvrG4HRua5hC6oyyOPfn2HKdSseYA9b1be14fjNRQbSJRvXF3mlvt5/zct4sm+cPVmX8K5kbM2vfwHJgCnfjtPkzT8sqqg6YFdT35mAZGqb9/xY/wDSNSu/S3k2WgmHrJKirszaBZrZfnVnqITUOgM9TmixhcJn2obeqICv6tl7/Wyk/1W62wXlXGm9+WjS+8rRNB+vYxqKR3XmH2lhAiyVGbADsjjGtBVUTWjq+aPw670SjXkoii0YE8sqzUlMMGEkXdXl9fvGtnWKk3APSseuTsjedr7yq+AkXFVDqqkqcUuXwmZl2EjC2WRRbhmYdbtY5nEfqh5+MiBrGdR/JqdEUL4yRutyRTw8mSUAI6X2oSVge7EdM/8f4HwLf33EO4pTocTqAkNbpt6Z54asLe5Y12jSXbvd2dFsgeJbrslK7e4uy/TK8CXf0BP3KLU20QELYrjz9I70gtj9lJ9xwjdx4/xJtxDtrxfC4Afmpu+GNYA/mifpyP3GDeBB5CqN7btIvEWyVvRNH7ppAqZIPqYJ7dSDd2RFuhAId5Yq98GUTBn+eRzeigBvSi1bFkkEgldfghOoK5WhsQtQbXuBBXITMME3NaWCN6z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), "eyJ0aW1lc3RhbXAiOjE0OTU3NTE5MTYwNjksInByb2ZpbGVJZCI6ImE2OGYwYjY0OGQxNDQwMDBhOTVmNGI5YmExNGY4ZGY5IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dMZWZ0Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8zZWJmOTA3NDk0YTkzNWU5NTViZmNhZGFiODFiZWFmYjkwZmI5YmU0OWM3MDI2YmE5N2Q3OThkNWYxYTIzIn19fQ=="),
configLoad.getString("Menu.Admin.Levelling.Item.Previous.Displayname"), null, null, null, null), 1); configLoad.getString("Menu.Admin.Levelling.Item.Previous.Displayname"), null, null, null, null), 1);
} }
if (!(nextEndIndex == 0 || nextEndIndex < 0)) { if (!(nextEndIndex == 0 || nextEndIndex < 0)) {
nInv.addItem(nInv.createItem(SkullUtil.create( nInv.addItem(nInv.createItem(ItemUtils.getCustomHead(
"wZPrsmxckJn4/ybw/iXoMWgAe+1titw3hjhmf7bfg9vtOl0f/J6YLNMOI0OTvqeRKzSQVCxqNOij6k2iM32ZRInCQyblDIFmFadQxryEJDJJPVs7rXR6LRXlN8ON2VDGtboRTL7LwMGpzsrdPNt0oYDJLpR0huEeZKc1+g4W13Y4YM5FUgEs8HvMcg4aaGokSbvrYRRcEh3LR1lVmgxtbiUIr2gZkR3jnwdmZaIw/Ujw28+Et2pDMVCf96E5vC0aNY0KHTdMYheT6hwgw0VAZS2VnJg+Gz4JCl4eQmN2fs4dUBELIW2Rdnp4U1Eb+ZL8DvTV7ofBeZupknqPOyoKIjpInDml9BB2/EkD3zxFtW6AWocRphn03Z203navBkR6ztCMz0BgbmQU/m8VL/s8o4cxOn+2ppjrlj0p8AQxEsBdHozrBi8kNOGf1j97SDHxnvVAF3X8XDso+MthRx5pbEqpxmLyKKgFh25pJE7UaMSnzH2l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JTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="), "eyJ0aW1lc3RhbXAiOjE0OTM4NjgxMDA2NzMsInByb2ZpbGVJZCI6IjUwYzg1MTBiNWVhMDRkNjBiZTlhN2Q1NDJkNmNkMTU2IiwicHJvZmlsZU5hbWUiOiJNSEZfQXJyb3dSaWdodCIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMWI2ZjFhMjViNmJjMTk5OTQ2NDcyYWVkYjM3MDUyMjU4NGZmNmY0ZTgzMjIxZTU5NDZiZDJlNDFiNWNhMTNiIn19fQ=="),
configLoad.getString("Menu.Admin.Levelling.Item.Next.Displayname"), null, null, null, null), 7); configLoad.getString("Menu.Admin.Levelling.Item.Next.Displayname"), null, null, null, null), 7);
@ -270,7 +270,7 @@ public class Levelling implements Listener {
soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F); soundManager.playSound(player, CompatibleSound.BLOCK_ANVIL_LAND.getSound(), 1.0F, 1.0F);
return; return;
} else if ((event.getCurrentItem().getType() == SkullUtil.createItemStack().getType()) } else if ((event.getCurrentItem().getType() == CompatibleMaterial.PLAYER_HEAD.getMaterial())
&& (is.hasItemMeta())) { && (is.hasItemMeta())) {
if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', if (is.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Admin.Levelling.Item.Previous.Displayname")))) { configLoad.getString("Menu.Admin.Levelling.Item.Previous.Displayname")))) {

View File

@ -1,70 +0,0 @@
package com.songoda.skyblock.utils.item;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import com.songoda.core.compatibility.CompatibleMaterial;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
import java.lang.reflect.Field;
import java.util.Base64;
import java.util.UUID;
public final class SkullUtil {
public static ItemStack create(String skinTexture) {
ItemStack is = createItemStack();
SkullMeta sm = (SkullMeta) is.getItemMeta();
GameProfile gameProfile = new GameProfile(UUID.randomUUID(), null);
byte[] encodedData = Base64.getEncoder()
.encode(String.format("{textures:{SKIN:{url:\"%s\"}}}", skinTexture).getBytes());
gameProfile.getProperties().put("textures", new Property("textures", new String(encodedData)));
Field profileField;
try {
profileField = sm.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(sm, gameProfile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e1) {
e1.printStackTrace();
}
is.setItemMeta(sm);
return is;
}
public static ItemStack create(String signature, String value) {
if (signature == null || signature.isEmpty() || value == null || value.isEmpty()) {
signature = "K9P4tCIENYbNpDuEuuY0shs1x7iIvwXi4jUUVsATJfwsAIZGS+9OZ5T2HB0tWBoxRvZNi73Vr+syRdvTLUWPusVXIg+2fhXmQoaNEtnQvQVGQpjdQP0TkZtYG8PbvRxE6Z75ddq+DVx/65OSNHLWIB/D+Rg4vINh4ukXNYttn9QvauDHh1aW7/IkIb1Bc0tLcQyqxZQ3mdglxJfgIerqnlA++Lt7TxaLdag4y1NhdZyd3OhklF5B0+B9zw/qP8QCzsZU7VzJIcds1+wDWKiMUO7+60OSrIwgE9FPamxOQDFoDvz5BOULQEeNx7iFMB+eBYsapCXpZx0zf1bduppBUbbVC9wVhto/J4tc0iNyUq06/esHUUB5MHzdJ0Y6IZJAD/xIw15OLCUH2ntvs8V9/cy5/n8u3JqPUM2zhUGeQ2p9FubUGk4Q928L56l3omRpKV+5QYTrvF+AxFkuj2hcfGQG3VE2iYZO6omXe7nRPpbJlHkMKhE8Xvd1HP4PKpgivSkHBoZ92QEUAmRzZydJkp8CNomQrZJf+MtPiNsl/Q5RQM+8CQThg3+4uWptUfP5dDFWOgTnMdA0nIODyrjpp+bvIJnsohraIKJ7ZDnj4tIp4ObTNKDFC/8j8JHz4VCrtr45mbnzvB2DcK8EIB3JYT7ElJTHnc5BKMyLy5SKzuw=";
value = "eyJ0aW1lc3RhbXAiOjE1MjkyNTg0MTE4NDksInByb2ZpbGVJZCI6Ijg2NjdiYTcxYjg1YTQwMDRhZjU0NDU3YTk3MzRlZWQ3IiwicHJvZmlsZU5hbWUiOiJTdGV2ZSIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGMxYzc3Y2U4ZTU0OTI1YWI1ODEyNTQ0NmVjNTNiMGNkZDNkMGNhM2RiMjczZWI5MDhkNTQ4Mjc4N2VmNDAxNiJ9LCJDQVBFIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjc2N2Q0ODMyNWVhNTMyNDU2MTQwNmI4YzgyYWJiZDRlMjc1NWYxMTE1M2NkODVhYjA1NDVjYzIifX19";
}
ItemStack is = createItemStack();
SkullMeta sm = (SkullMeta) is.getItemMeta();
GameProfile gameProfile = new GameProfile(UUID.randomUUID(), null);
gameProfile.getProperties().put("textures", new Property("textures", value, signature));
Field profileField;
try {
profileField = sm.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(sm, gameProfile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e1) {
e1.printStackTrace();
}
is.setItemMeta(sm);
return is;
}
public static ItemStack createItemStack() {
return CompatibleMaterial.PLAYER_HEAD.getItem();
}
}