Balance Strong Consumables and Blocks with Use Cooldowns
Attack cooldowns only cover hitting. To limit how often players can eat, place blocks, or use items, use the useCooldown command instead. It is useful for stopping players from chain-eating healing food or spamming certain blocks in a fight.
Pick What to Limit
The use cooldown covers three kinds of actions:
- Eating, for powerful food like
minecraft:golden_appleorminecraft:enchanted_golden_apple. - Placing blocks, for items like
minecraft:tntorminecraft:obsidianif fast placement is unbalancing your PvP. - Using items that have a right-click or use action, such as
minecraft:firework_rocket.
Set the Use Delay
1. Open chat.
2. Run /itemcooldown useCooldown <item> <seconds>.
3. Close chat and try using the item twice quickly. The second use should be held back until the delay has passed.
4. Repeat for each item you want to limit.
Combine with Attack Cooldowns
A single item can have both an attack cooldown and a use cooldown. They are set separately with attackCooldown and useCooldown.
For example, a weapon that can also be used might need both. Set each one on its own and test them separately so you know which delay you're feeling. To change a value, run the command again with a new duration. To clear everything at once, use /itemcooldown reset.