mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-21 15:01:19 +01:00
🟢 added additional permissions to admin gui
Took 1 minute
This commit is contained in:
parent
ea4581d0d8
commit
07a5f22ff4
@ -66,6 +66,8 @@ public class GUIAdminItem extends AbstractPlaceholderGui {
|
||||
|
||||
if (Settings.ADMIN_OPTION_SHOW_RETURN_ITEM.getBoolean())
|
||||
setButton(1, 1, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_ITEM_ADMIN_ITEMS_RETURN_ITEM.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_RETURN_NAME.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_RETURN_LORE.getStringList(), null), e -> {
|
||||
if (!e.player.hasPermission("auctionhouse.admin.returnitem")) return;
|
||||
|
||||
AuctionAdminEvent event = new AuctionAdminEvent(createLog(e.player, AdminAction.RETURN_ITEM));
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) return;
|
||||
@ -88,6 +90,7 @@ public class GUIAdminItem extends AbstractPlaceholderGui {
|
||||
|
||||
if (Settings.ADMIN_OPTION_SHOW_CLAIM_ITEM.getBoolean())
|
||||
setButton(1, 3, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_ITEM_ADMIN_ITEMS_CLAIM_ITEM.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_CLAIM_NAME.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_CLAIM_LORE.getStringList(), null), e -> {
|
||||
if (!e.player.hasPermission("auctionhouse.admin.claimitem")) return;
|
||||
AuctionAdminEvent event = new AuctionAdminEvent(createLog(e.player, AdminAction.CLAIM_ITEM));
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) return;
|
||||
@ -110,6 +113,7 @@ public class GUIAdminItem extends AbstractPlaceholderGui {
|
||||
|
||||
if (Settings.ADMIN_OPTION_SHOW_DELETE_ITEM.getBoolean())
|
||||
setButton(1, 5, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_ITEM_ADMIN_ITEMS_DELETE_ITEM.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_DELETE_NAME.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_DELETE_LORE.getStringList(), null), e -> {
|
||||
if (!e.player.hasPermission("auctionhouse.admin.deleteitem")) return;
|
||||
AuctionAdminEvent event = new AuctionAdminEvent(createLog(e.player, AdminAction.DELETE_ITEM));
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled()) return;
|
||||
@ -130,6 +134,7 @@ public class GUIAdminItem extends AbstractPlaceholderGui {
|
||||
|
||||
if (Settings.ADMIN_OPTION_SHOW_COPY_ITEM.getBoolean())
|
||||
setButton(1, 7, ConfigurationItemHelper.createConfigurationItem(Settings.GUI_ITEM_ADMIN_ITEMS_COPY_ITEM.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_COPY_NAME.getString(), Settings.GUI_ITEM_ADMIN_ITEMS_COPY_LORE.getStringList(), null), e -> {
|
||||
if (!e.player.hasPermission("auctionhouse.admin.copyitem")) return;
|
||||
if (Settings.ITEM_COPY_REQUIRES_GMC.getBoolean() && e.player.getGameMode() != GameMode.CREATIVE) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.requires creative").sendPrefixedMessage(e.player);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user