0
0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-31 12:01:22 +00:00
2024-12-14 12:50:23 -08:00

17 lines
651 B
Diff

--- a/net/minecraft/world/item/ItemCooldowns.java
+++ b/net/minecraft/world/item/ItemCooldowns.java
@@ -56,6 +_,13 @@
}
public void addCooldown(ResourceLocation group, int cooldown) {
+ // Paper start - Item cooldown events
+ this.addCooldown(group, cooldown, true);
+ }
+
+ public void addCooldown(ResourceLocation group, int cooldown, boolean callEvent) {
+ // Event called in server override
+ // Paper end - Item cooldown events
this.cooldowns.put(group, new ItemCooldowns.CooldownInstance(this.tickCount, this.tickCount + cooldown));
this.onCooldownStarted(group, cooldown);
}