2.6.1 #6

Merged
JaTiTV merged 1 commits from perm-change into main 2022-03-21 21:23:26 +00:00
3 changed files with 79 additions and 75 deletions
Showing only changes of commit 92d4c86aa0 - Show all commits

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.6.0</version>
<version>2.6.1</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -48,10 +48,10 @@ public class GUI_Listener implements Listener {
*/
if (e.getSlot() == slot.Slot) {
if (!slot.Perm || player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1))
if (!slot.Perm
|| player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1))
|| player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1) + ".use")
|| player.hasPermission("commandgui.admin")) {
if (slot.Enable) {
if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Replace.replace(prefix, slot.Name))) {
if (e.getCurrentItem().getType() == ItemVersion.getHead() || e.getCurrentItem().getType() == Material.valueOf(slot.Item.toUpperCase().replace(".", "_"))) {

View File

@ -90,6 +90,10 @@ public class OpenGUI {
}
}
for (Slot slot : gui.GUI_Slots) {
if (!slot.Perm
|| player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1))
|| player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1)+".see")
|| player.hasPermission("commandgui.admin")) {
if (slot.Enable) {
if (slot.Empty) {
ItemStack air = new ItemStack(Material.AIR);
@ -186,7 +190,7 @@ public class OpenGUI {
}
}
}
}
player.openInventory(inventory);
send.debug(plugin, "§6" + player.getName() + " §5Open §6" + Replace.replace(prefix, gui.GUI_Name) + " §5" + " §7- §e" + (System.currentTimeMillis() - long_.longValue()) + "ms");
} else player.sendMessage(SelectMessages.GUIIsDisabled.replace("[gui]", Replace.replace(prefix, gui.GUI_Name)));