Cooldown
Set cooldown limits on item clicks to prevent rapid interaction, command spam, and server load spikes.
Configuration Styles
1. Shorthand (Duration Only)
menu-items:
- slot: 13
material: ENDER_PEARL
name: "&aSpawn Teleport"
cooldown: 5s # 5 second cooldown
command: "/spawn"
2. Full Section Configuration
menu-items:
- slot: 13
material: ENDER_PEARL
name: "&aSpawn Teleport"
cooldown:
duration: 10s # Cooldown duration (e.g. 500ms, 10s, 1m)
bypass-permission: "easymenu.cooldown.bypass" # Permission to bypass cooldown
message: "&cPlease wait {remaining}s before using this again." # Rejection message
key: "global_teleport" # Shared cooldown group key
command: "/spawn"
Cooldown Properties
| Key | Type | Default | Description |
|---|---|---|---|
duration | Duration | Required | Cooldown duration (500ms, 5s, 1m, 1h). |
bypass-permission | Text | None | Players holding this permission node are exempt from the cooldown. |
message | Text | Localized message | Message sent when clicked during cooldown. {remaining} expands remaining seconds. |
key | Text | None | Shared group identifier across elements. |
Shared Cooldown Groups (key)
By default, cooldowns are isolated to player + menu + element.
Setting a key allows multiple elements to share a single cooldown timer:
Warp Menu Example
menu-items:
# Spawn warp
- slot: 11
material: COMPASS
name: "&aWarp Spawn"
cooldown:
duration: 30s
key: "teleport_cooldown" # Shared key
command: "/spawn"
# Lobby warp
- slot: 15
material: NETHER_STAR
name: "&bWarp Lobby"
cooldown:
duration: 30s
key: "teleport_cooldown" # Shared key
command: "/lobby"
After using the Spawn warp, the Lobby warp is also placed on cooldown for 30 seconds.
Consumption Timing & Abuse Prevention
EasyMenu 7 consumes the cooldown timer immediately after conditions pass and before actions start (ON_ATTEMPT).
Even if an action fails or player chat input is cancelled, the cooldown remains consumed. This prevents exploiters from bypassing cooldowns by repeatedly cancelling prompts.