forked from Upstream/CommandPanels
v3.14.2.2
This commit is contained in:
parent
00152786e0
commit
0620207ea1
@ -1,4 +1,4 @@
|
||||
version: 3.14.2.1
|
||||
version: 3.14.2.2
|
||||
main: me.rockyhawk.commandpanels.CommandPanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user