mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
16 lines
651 B
Diff
16 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);
|
|
}
|