block filter menu search behind cmd perm (auctionhouse.cmd.search). Closes #67

Took 2 minutes
This commit is contained in:
Kiran Hart 2023-08-11 09:56:26 -04:00
parent 043975cc47
commit d4beb618ec
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -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<String, Object>() {{
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) {