v3.14.2.2

This commit is contained in:
rockyhawk64 2020-12-12 18:40:40 +11:00
parent 00152786e0
commit 0620207ea1
4 changed files with 12 additions and 11 deletions

View File

@ -1,4 +1,4 @@
version: 3.14.2.1
version: 3.14.2.2
main: me.rockyhawk.commandpanels.CommandPanels
name: CommandPanels
author: RockyHawk

View File

@ -431,10 +431,8 @@ 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
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
@ -442,7 +440,6 @@ public class ItemCreation {
}
}
}
}
try {
BannerMeta bannerMeta = (BannerMeta) cont.getItemMeta();
List<String> dyePattern = new ArrayList<>();

View File

@ -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() {

View File

@ -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;