diff --git a/resource/plugin.yml b/resource/plugin.yml index 2367e6d..8c745ab 100644 --- a/resource/plugin.yml +++ b/resource/plugin.yml @@ -1,4 +1,4 @@ -version: 3.14.2.1 +version: 3.14.2.2 main: me.rockyhawk.commandpanels.CommandPanels name: CommandPanels author: RockyHawk diff --git a/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java b/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java index d41286f..cb3060e 100644 --- a/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java +++ b/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java @@ -431,15 +431,12 @@ public class ItemCreation { if(plugin.getHeads.ifSkullOrHead(cont.getType().toString())){ if(!Objects.requireNonNull(file.getString("panels." + panelName + ".item." + i + ".material")).contains("%") && !Objects.requireNonNull(file.getString("panels." + panelName + ".item." + i + ".material")).contains("=")) { SkullMeta meta = (SkullMeta) cont.getItemMeta(); - //disable for legacy as is broken - if (!plugin.legacy.isLegacy()) { - if (plugin.customHeads.getHeadBase64(cont) != null) { - //inject base64 here - file.set("panels." + panelName + ".item." + i + ".material", "cps= " + plugin.customHeads.getHeadBase64(cont)); - } else if (meta.hasOwner()) { - //check for skull owner - file.set("panels." + panelName + ".item." + i + ".material", "cps= " + meta.getOwner()); - } + if (plugin.customHeads.getHeadBase64(cont) != null && !plugin.legacy.isLegacy()) { + //inject base64 here, disable for legacy as is not working + file.set("panels." + panelName + ".item." + i + ".material", "cps= " + plugin.customHeads.getHeadBase64(cont)); + } else if (meta.hasOwner()) { + //check for skull owner + file.set("panels." + panelName + ".item." + i + ".material", "cps= " + meta.getOwner()); } } } diff --git a/src/me/rockyhawk/commandpanels/ingameeditor/EditorUserInput.java b/src/me/rockyhawk/commandpanels/ingameeditor/EditorUserInput.java index 8366f7f..3d8fded 100644 --- a/src/me/rockyhawk/commandpanels/ingameeditor/EditorUserInput.java +++ b/src/me/rockyhawk/commandpanels/ingameeditor/EditorUserInput.java @@ -55,6 +55,9 @@ public class EditorUserInput implements Listener { } } catch (Exception fail) { //could not fetch all panel names (probably no panels exist) + plugin.debug(fail); + plugin.editorInputStrings.remove(temp); + return; } if(e.getMessage().equalsIgnoreCase(plugin.config.getString("config.input-cancel"))){ plugin.editorInputStrings.remove(temp); @@ -62,6 +65,7 @@ public class EditorUserInput implements Listener { e.getPlayer().sendMessage(plugin.papi( Objects.requireNonNull(plugin.config.getString("config.input-cancelled")))); return; } + plugin.editorInputStrings.remove(temp); if(section.startsWith("panel.")) { panelSectionCheck(p, section, panelName, panelTitle, cf, cfile, panelFile, e); }else if(section.startsWith("item:")){ @@ -69,7 +73,6 @@ public class EditorUserInput implements Listener { }else if(section.startsWith("section.")){ itemSectionSectionCheck(p, section, panelName, cf, cfile, panelFile, e); } - plugin.editorInputStrings.remove(temp); plugin.reloadPanelFiles(); if(section.startsWith("panel.")){ plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { diff --git a/src/me/rockyhawk/commandpanels/openpanelsmanager/OpenGUI.java b/src/me/rockyhawk/commandpanels/openpanelsmanager/OpenGUI.java index f716d83..9f32cff 100644 --- a/src/me/rockyhawk/commandpanels/openpanelsmanager/OpenGUI.java +++ b/src/me/rockyhawk/commandpanels/openpanelsmanager/OpenGUI.java @@ -8,6 +8,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.SkullMeta; import java.util.Iterator; import java.util.Objects;