Skip to content

Quick Mod

A toolbox menu for admins. The menu itself is gated at the top level via rules: ${rulesAdmin} - non-admins running /ame_mod are blocked from opening at all (no need to gate every individual click).

  • Menu-level rules: top-level rules: ... blocks the open instead of just hiding items
  • The setGamemode action with vanilla mode names
  • The broadcast action for server-wide chat
  • The command action with player: (run as the player) vs console: (run as console)
  • Chaining hubs: this admin menu opens Online Players for finer-grained moderation

Two ways to gate access:

Menu-level (this example):

rules: ${rulesAdmin}

At the top of the file. If the rule fails when the activator fires, the menu doesn’t open at all.

Item-level:

{
slot: 4
...
click {
rules { permission: "..." }
actions { ... }
}
}

Inside an item’s click block. The menu opens for everyone, but specific items are gated.

For an admin toolbox, menu-level is right - non-admins shouldn’t see the layout. For a shop with VIP items, item-level is right - everyone should see what’s available.

command runs server commands via the action handler:

command {
player: "spawn" # runs /spawn as the player
}

Or as console:

command {
console: "kick %ctg_player_name%" # runs /kick ... from console
}

player: form respects the player’s permissions - they need to be allowed to use the command. console: form bypasses permissions (use carefully). For admin commands like /ban, prefer console: from a permission-gated menu to avoid double-checking the same auth twice.

  1. Drop the bundle into plugins/AbstractMenus/menus/example/.
  2. /am reload.
  3. Grant yourself abstractmenus.admin (the rulesAdmin shared template references this node).
  4. Type /ame_mod in-game.