From d4beb618ecadd7b03529bb353198a2425834d937 Mon Sep 17 00:00:00 2001 From: Kiran Hart Date: Fri, 11 Aug 2023 09:56:26 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9D=8C=20block=20filter=20menu=20search=20be?= =?UTF-8?q?hind=20cmd=20perm=20(auctionhouse.cmd.search).=20Closes=20#67?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Took 2 minutes --- .../tweetzy/auctionhouse/guis/filter/GUIFilterSelection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/ca/tweetzy/auctionhouse/guis/filter/GUIFilterSelection.java b/src/main/java/ca/tweetzy/auctionhouse/guis/filter/GUIFilterSelection.java index b500210..5e2fb57 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/guis/filter/GUIFilterSelection.java +++ b/src/main/java/ca/tweetzy/auctionhouse/guis/filter/GUIFilterSelection.java @@ -76,6 +76,11 @@ public class GUIFilterSelection extends AbstractPlaceholderGui { setButton(1, 5, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_FILTER_ITEMS_SEARCH_ITEM.getString(), Settings.GUI_FILTER_ITEMS_SEARCH_NAME.getString(), Settings.GUI_FILTER_ITEMS_SEARCH_LORE.getStringList(), new HashMap() {{ put("%filter_search_phrase%", auctionPlayer.getCurrentSearchPhrase()); }}), e -> { + if (e.player.hasPermission("auctionhouse.cmd.search")) { + AuctionHouse.getInstance().getLocale().getMessage("commands.no_permission").sendPrefixedMessage(e.player); + return; + } + e.gui.exit(); ChatPrompt.showPrompt(AuctionHouse.getInstance(), this.auctionPlayer.getPlayer(), TextUtils.formatText(AuctionHouse.getInstance().getLocale().getMessage("general.entersearchphrase").getMessage()), chat -> { if (chat.getMessage() != null && chat.getMessage().length() != 0) {