This commit is contained in:
rockyhawk64 2021-09-29 03:09:14 +10:00
parent 2bb57a42f5
commit 156e5ccb83
2 changed files with 22 additions and 1 deletions

View File

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

View File

@ -43,6 +43,9 @@ public class EditorUtils implements Listener {
if(e.getClickedInventory() != e.getView().getTopInventory()){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
e.setCancelled(true);
ArrayList<String> panelNames = new ArrayList<String>(); //all panels from ALL files (panel names)
ArrayList<String> panelTitles = new ArrayList<String>(); //all panels from ALL files (panel titles)
@ -128,6 +131,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Editing Panel:") || plugin.openPanels.hasPanelOpen(p.getName(),PanelPosition.Top)){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
String panelName = ""; //all panels from ALL files (panel names)
File file = null; //all panels from ALL files (panel names)
YamlConfiguration config = new YamlConfiguration(); //all panels from ALL files (panel yaml files)
@ -185,6 +191,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Editing Panel:") || plugin.openPanels.hasPanelOpen(p.getName(),PanelPosition.Top)){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
String panelName = "";
File file = null;
YamlConfiguration config = new YamlConfiguration();
@ -313,6 +322,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Panel Settings:") || plugin.openPanels.hasPanelOpen(p.getName(),PanelPosition.Top)){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
e.setCancelled(true);
String panelName = ""; //all panels from ALL files (panel names)
boolean found = false;
@ -464,6 +476,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Item Settings:") || plugin.openPanels.hasPanelOpen(p.getName(),PanelPosition.Top)){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
e.setCancelled(true);
String panelName = ""; //all panels from ALL files (panel names)
ConfigurationSection panelYaml = null; //all panels from ALL files (panel names)
@ -585,6 +600,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Item Sections:") || plugin.openPanels.hasPanelOpen(p.getName(),PanelPosition.Top)){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
e.setCancelled(true);
String panelName = ""; //all panels from ALL files (panel names)
ConfigurationSection panelYaml = null;
@ -695,6 +713,9 @@ public class EditorUtils implements Listener {
if(!p.getOpenInventory().getTitle().contains("Editing Panel:")){
return;
}
if(!p.hasPermission("commandpanel.edit")){
return;
}
String panelName = ""; //all panels from ALL files (panel names)
File file = null; //all panels from ALL files (panel names)
YamlConfiguration config = new YamlConfiguration(); //all panels from ALL files (panel yaml files)