v3.14.2.5

This commit is contained in:
rockyhawk64 2020-12-15 22:15:22 +11:00
parent 45909f3b28
commit 5f9a852b41
4 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# |------------------------------------------------------------------------
# | CommandPanels Config File
# | By RockyHawk v4.3
# | By RockyHawk v4.4
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
# |
# | auto-update and minor-updates-only is HEAVILY RECOMMENDED
@ -11,6 +11,7 @@ config:
ingame-editor: true
hotbar-items: true
custom-commands: true
auto-register-commands: true
refresh-delay: 4
server-ping-timeout: 10
stop-sound: true

View File

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

View File

@ -36,8 +36,10 @@ public class Commandpanelsreload implements CommandExecutor {
//reloadHotbarSlots
plugin.hotbar.reloadHotbarSlots();
//add custom commands
registerCommands();
//add custom commands to commands.yml
if(plugin.config.getString("config.auto-register-commands").equalsIgnoreCase("true")) {
registerCommands();
}
plugin.tag = plugin.papi(plugin.config.getString("config.format.tag") + " ");
sender.sendMessage(plugin.papi(plugin.tag + plugin.config.getString("config.format.reload")));

View File

@ -31,7 +31,9 @@ public class PanelBlockOnClick implements Listener {
if(!plugin.blockConfig.contains("blocks")){
return;
}
if(Objects.requireNonNull(plugin.config.getString("config.panel-blocks")).equalsIgnoreCase("false")){
if(plugin.openPanels.hasPanelOpen(p.getName())) {
//some blocks run this event twice, skip if panel already open
//as blocks cannot be clicked obviously if a panel is open
return;
}
for (String configLocation : Objects.requireNonNull(plugin.blockConfig.getConfigurationSection("blocks")).getKeys(false)) {