Merge pull request '2.6.1' (#6) from perm-change into main
Reviewed-on: JaTiTV/CommandGUI#6
This commit is contained in:
commit
ff2cb3ce96
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>CommandGUI_V2</artifactId>
|
<artifactId>CommandGUI_V2</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>2.6.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>CommandGUI</name>
|
<name>CommandGUI</name>
|
||||||
|
@ -48,10 +48,10 @@ public class GUI_Listener implements Listener {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (e.getSlot() == slot.Slot) {
|
if (e.getSlot() == slot.Slot) {
|
||||||
|
if (!slot.Perm
|
||||||
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))
|
||||||
|
|| player.hasPermission("commandgui.gui." + gui.Command_Command + ".slot." + (slot.Slot + 1) + ".use")
|
||||||
|| player.hasPermission("commandgui.admin")) {
|
|| player.hasPermission("commandgui.admin")) {
|
||||||
|
|
||||||
if (slot.Enable) {
|
if (slot.Enable) {
|
||||||
if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Replace.replace(prefix, slot.Name))) {
|
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(".", "_"))) {
|
if (e.getCurrentItem().getType() == ItemVersion.getHead() || e.getCurrentItem().getType() == Material.valueOf(slot.Item.toUpperCase().replace(".", "_"))) {
|
||||||
|
@ -90,6 +90,10 @@ public class OpenGUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Slot slot : gui.GUI_Slots) {
|
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.Enable) {
|
||||||
if (slot.Empty) {
|
if (slot.Empty) {
|
||||||
ItemStack air = new ItemStack(Material.AIR);
|
ItemStack air = new ItemStack(Material.AIR);
|
||||||
@ -186,7 +190,7 @@ public class OpenGUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
player.openInventory(inventory);
|
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");
|
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)));
|
} else player.sendMessage(SelectMessages.GUIIsDisabled.replace("[gui]", Replace.replace(prefix, gui.GUI_Name)));
|
||||||
|
Loading…
Reference in New Issue
Block a user