forked from Upstream/CommandPanels
v3.14.2.4
This commit is contained in:
parent
99833c01d4
commit
45909f3b28
@ -1,7 +1,9 @@
|
|||||||
# |------------------------------------------------------------------------
|
# |------------------------------------------------------------------------
|
||||||
# | CommandPanels Config File
|
# | CommandPanels Config File
|
||||||
# | By RockyHawk v4.2
|
# | By RockyHawk v4.3
|
||||||
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
|
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
|
||||||
|
# |
|
||||||
|
# | auto-update and minor-updates-only is HEAVILY RECOMMENDED
|
||||||
# |------------------------------------------------------------------------
|
# |------------------------------------------------------------------------
|
||||||
config:
|
config:
|
||||||
refresh-panels: true
|
refresh-panels: true
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: 3.14.2.3
|
version: 3.14.2.4
|
||||||
main: me.rockyhawk.commandpanels.CommandPanels
|
main: me.rockyhawk.commandpanels.CommandPanels
|
||||||
name: CommandPanels
|
name: CommandPanels
|
||||||
author: RockyHawk
|
author: RockyHawk
|
||||||
|
@ -39,7 +39,12 @@ public class HotbarItemLoader {
|
|||||||
if(openPanel) {
|
if(openPanel) {
|
||||||
String panelName = plugin.panelNames.get(temp[1])[0];
|
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);
|
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")){
|
if(tempFile.contains("open-with-item.commands")){
|
||||||
for(String command : tempFile.getStringList("open-with-item.commands")){
|
for(String command : tempFile.getStringList("open-with-item.commands")){
|
||||||
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);
|
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);
|
||||||
@ -76,7 +81,12 @@ public class HotbarItemLoader {
|
|||||||
}
|
}
|
||||||
if(panelItem.isSimilar(invItem)){
|
if(panelItem.isSimilar(invItem)){
|
||||||
if(openPanel) {
|
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")){
|
if(tempFile.contains("open-with-item.commands")){
|
||||||
for(String command : tempFile.getStringList("open-with-item.commands")){
|
for(String command : tempFile.getStringList("open-with-item.commands")){
|
||||||
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);
|
plugin.commandTags.commandTags(p,plugin.papi(p,command),command);
|
||||||
|
Loading…
Reference in New Issue
Block a user