v3.14.2.4

This commit is contained in:
rockyhawk64 2020-12-15 19:28:35 +11:00
parent 99833c01d4
commit 45909f3b28
3 changed files with 16 additions and 4 deletions

View File

@ -1,7 +1,9 @@
# |------------------------------------------------------------------------
# | CommandPanels Config File
# | By RockyHawk v4.2
# | By RockyHawk v4.3
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
# |
# | auto-update and minor-updates-only is HEAVILY RECOMMENDED
# |------------------------------------------------------------------------
config:
refresh-panels: true

View File

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

View File

@ -39,7 +39,12 @@ public class HotbarItemLoader {
if(openPanel) {
String panelName = plugin.panelNames.get(temp[1])[0];
ConfigurationSection tempFile = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + plugin.panelFiles.get(Integer.parseInt(plugin.panelNames.get(temp[1])[1])))).getConfigurationSection("panels." + panelName);
//only open panel automatically if there are no commands
//only open panel automatically if there are no commands and player world is not disabled
if(tempFile.contains("disabled-worlds")){
if(tempFile.getStringList("disabled-worlds").contains(p.getWorld().getName())){
return false;
}
}
if(tempFile.contains("open-with-item.commands")){
for(String command : tempFile.getStringList("open-with-item.commands")){
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);
@ -76,7 +81,12 @@ public class HotbarItemLoader {
}
if(panelItem.isSimilar(invItem)){
if(openPanel) {
//only open panel automatically if there are no commands
//only open panel automatically if there are no commands and if world is not disabled
if(tempFile.contains("disabled-worlds")){
if(tempFile.getStringList("disabled-worlds").contains(p.getWorld().getName())){
return false;
}
}
if(tempFile.contains("open-with-item.commands")){
for(String command : tempFile.getStringList("open-with-item.commands")){
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);