-
Notifications
You must be signed in to change notification settings - Fork 0
NPCs Citizens
You can put an auctioneer NPC in your spawn that opens the Auction House on click, using Citizens.
There's nothing to install on the RoyalAuctions side — /ah takes no arguments, so a Citizens NPC just runs the command. Citizens is not a dependency of RoyalAuctions; this is purely Citizens' own command trait pointed at /ah.
/npc create Auctioneer
/npc command add ah
/npc command cooldown 2
-
/npc create Auctioneer— spawn the NPC (stand where you want it). -
/npc command add ah— clicking it runs/ah. -
/npc command cooldown 2— a 2-second cooldown so spam-clicking doesn't reopen the menu repeatedly.
The command must run as the player — that's Citizens' default (player: true). Two reasons:
-
/ahis player-only; an NPC set to run it as console just prints "player only". - The player then opens their own Auction House with their own permissions — which is what you want.
Citizens' command trait supports which hand triggers the command. If you want the NPC to respond to either click, set it to both when adding the command (see Citizens' /npc command help for the exact flag on your version). By default a command runs on right-click.
Because the command runs as the clicking player, the NPC inherits that player's permissions. A player without royalauctions.use who clicks the auctioneer gets nothing — the NPC doesn't bypass permissions. See Commands & Permissions.
If you also run RoyalBazaar, the same recipe with /bz gives you a trader NPC next to the auctioneer.
RoyalAuctions · part of the eco suite (RoyalBank · RoyalBazaar · EconGuard) · Source on GitHub
Getting started
Using it
- Buying, Selling & Bidding
- Menus & GUI
- Categories
- Item Tiers
- NPCs (Citizens)
- PlaceholderAPI
- EconGuard Integration
- Storage & Data
Help