Update OpenGUI.java

This commit is contained in:
JaTiTV 2022-01-01 17:48:42 +01:00
parent b36fdc2d67
commit b80eaa08be

View File

@ -90,10 +90,10 @@ public class OpenGUI {
send.error(plugin, "Playerheads are only available from version 1.13!"); send.error(plugin, "Playerheads are only available from version 1.13!");
send.console(prefix + " §bGUI: §6" + Replace.replace(prefix, gui.GUI_Name).toString() + " §bSlot: §6" + (slot.Slot + 1) + " §7- " + Replace.replace(prefix, slot.Name)); send.console(prefix + " §bGUI: §6" + Replace.replace(prefix, gui.GUI_Name).toString() + " §bSlot: §6" + (slot.Slot + 1) + " §7- " + Replace.replace(prefix, slot.Name));
} else { } else {
ItemStack item = ItemVersion.getHeadIS();
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
if (slot.Base64_Enable) { if (slot.Base64_Enable) {
ItemStack item = ItemVersion.getHeadIS();
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
if (Main.PaPi) { if (Main.PaPi) {
itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName()))); itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName())));
itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency)); itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency));
@ -120,8 +120,6 @@ public class OpenGUI {
inventory.setItem(slot.Slot, item); inventory.setItem(slot.Slot, item);
} else { } else {
if (slot.PlayerWhoHasOpenedTheGUI) { if (slot.PlayerWhoHasOpenedTheGUI) {
ItemStack item = ItemVersion.getHeadIS();
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
if (Main.PaPi) { if (Main.PaPi) {
itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName()))); itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName())));
itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency)); itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency));
@ -138,8 +136,6 @@ public class OpenGUI {
item.setAmount(am); item.setAmount(am);
inventory.setItem(slot.Slot, item); inventory.setItem(slot.Slot, item);
} else { } else {
ItemStack item = ItemVersion.getHeadIS();
SkullMeta itemMeta = (SkullMeta) item.getItemMeta();
if (Main.PaPi) { if (Main.PaPi) {
itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName()))); itemMeta.setDisplayName(Replace.replace(prefix, player, slot.Name.replace("[player]", player.getName())));
itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency)); itemMeta.setLore(Replace.replacePrice(prefix, player, slot.Lore, slot.Price + " " + SelectConfig.Currency));