Item Cooldowns
Cooldowns for golden apples, pearls, totems and other PvP items, with different times in and out of combat and per world.
Item Cooldowns puts a wait between two uses of the same item, such as one golden apple every 10
seconds. A cooldown can be different while the player is tagged and while they are not. File:
configs/ItemCooldowns.yml.
All cooldowns are 0 by default, so nothing changes until you set one.
How it works
When a player uses an item with a cooldown, the vanilla cooldown shade appears on that item in the
hotbar, and every use before it ends is refused with cooldownMessage. The cooldown is per player
and per item type: eating a golden apple does not slow down enchanted golden apples, which have
their own.
Whether the combat or the non-combat time applies is decided at the moment of use, from whether the player is tagged then.
Players with uxmpvpcore.itemcooldown.bypass have no cooldowns. Ops have it, so test with a normal
account.
The items
| Key | Item | Counts when |
|---|---|---|
goldenAppleCooldown | Golden apple | Eaten |
enchantedGoldenAppleCooldown | Enchanted golden apple | Eaten |
chorusFruitCooldown | Chorus fruit | Eaten |
totemCooldown | Totem of undying | It saves the player. A totem on cooldown does not save them |
enderPearlCooldown | Ender pearl | Thrown |
windChargeCooldown | Wind charge | Thrown |
snowballCooldown, eggCooldown | Snowball, egg | Thrown |
splashPotionCooldown, lingeringPotionCooldown | Splash and lingering potions | Thrown. All potions of the kind share one cooldown |
tridentCooldown | Trident | Thrown |
tridentRiptideCooldown | Trident with Riptide | Used to launch. Separate from tridentCooldown |
bowCooldown, crossbowCooldown | Bow, crossbow | Shot |
fishingRodCooldown | Fishing rod | Right-clicked |
fireChargeCooldown, flintAndSteelCooldown | Fire charge, flint and steel | Right-clicked |
tntCooldown, tntMinecartCooldown | TNT, TNT minecart | Right-clicked to place |
lavaBucketCooldown, waterBucketCooldown | Lava and water buckets | Right-clicked to empty |
Right-clicking a block that opens or does something, such as a chest or a door, with one of the right-click items does not count. Other items cannot get a cooldown.
Writing a cooldown
A cooldown is either one number, the same everywhere, or three values:
defaultSettings:
enderPearlCooldown: 15
goldenAppleCooldown:
normal: 0
combat: 10
totemCooldown:
normal: 30
combat: 60
nonCombat: 0
| Key | Used when |
|---|---|
normal | Always, unless one of the two below is set |
combat | The player is tagged |
nonCombat | The player is not tagged |
In the example, golden apples are free outside fights and wait 10 seconds in them; totems have a minute cooldown in combat and none outside it. All values are whole seconds.
Per world
worldSettings gives a world its own cooldowns:
worldSettings:
arena:
enderPearlCooldown: 5
goldenAppleCooldown: 10
totemCooldown: 60
The comment in the file says items left out of a world section use the defaults. In 2.0.0 they do
not: in a world listed under worldSettings, every item you leave out has no cooldown at all. Copy
every cooldown you want from defaultSettings into the world's section.
Other keys
| Key | Default | Meaning |
|---|---|---|
enabled | true | Turns the module on or off |
bypassPerm | uxmpvpcore.itemcooldown.bypass | Players with it have no cooldowns |
cooldownMessage | You must wait {time} seconds before using <lang:{item}> again. | {time} is the seconds left with one decimal. {item} is the item's translation key: write <lang:{item}> so each player sees the item name in their own language |
Changes apply with /pvpcore reload ItemCooldown.
Related: Combat Restrictions, Combat Tag
Was this page helpful?