2.7.0 #8
@ -50,14 +50,14 @@ public class GUIListener implements Listener {
|
|||||||
for (Slot slot : gui.slots) {
|
for (Slot slot : gui.slots) {
|
||||||
Function function = Main.functionHashMap.get(slot.function);
|
Function function = Main.functionHashMap.get(slot.function);
|
||||||
if (e.getSlot() != slot.slot) continue;
|
if (e.getSlot() != slot.slot) continue;
|
||||||
|
if (slot.permission && !player.hasPermission(slot.permissionToUse)) {
|
||||||
|
player.sendMessage(SelectMessages.NoPermissionForItem.replace("[item]", Replace.replace(prefix, function.name))
|
||||||
|
.replace("[perm]", slot.permissionToUse));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (e.getCurrentItem().getType() == ItemVersion.getHead() || e.getCurrentItem().getType() == ItemVersion.getGreenWool().getType() ||
|
if (e.getCurrentItem().getType() == ItemVersion.getHead() || e.getCurrentItem().getType() == ItemVersion.getGreenWool().getType() ||
|
||||||
e.getCurrentItem().getType() == ItemVersion.getRedWool().getType() ||
|
e.getCurrentItem().getType() == ItemVersion.getRedWool().getType() ||
|
||||||
e.getCurrentItem().getType() == Material.valueOf(function.item.toUpperCase().replace(".", "_"))) {
|
e.getCurrentItem().getType() == Material.valueOf(function.item.toUpperCase().replace(".", "_"))) {
|
||||||
if (slot.permission && !player.hasPermission(slot.permissionToUse)) {
|
|
||||||
player.sendMessage(SelectMessages.NoPermissionForItem.replace("[item]", Replace.replace(prefix, function.name))
|
|
||||||
.replace("[perm]", slot.permissionToUse));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!slot.enable) continue;
|
if (!slot.enable) continue;
|
||||||
if (function.cost_Enable) {
|
if (function.cost_Enable) {
|
||||||
if (function.command_Enable || function.message_Enable || function.openGUI_Enable || function.serverChange) {
|
if (function.command_Enable || function.message_Enable || function.openGUI_Enable || function.serverChange) {
|
||||||
|
Loading…
Reference in New Issue
Block a user