mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 18:12:09 +01:00
16 lines
662 B
Diff
16 lines
662 B
Diff
--- a/net/minecraft/world/item/ItemCooldowns.java
|
|
+++ b/net/minecraft/world/item/ItemCooldowns.java
|
|
@@ -56,6 +56,13 @@
|
|
}
|
|
|
|
public void addCooldown(ResourceLocation groupId, int duration) {
|
|
+ // Paper start - Item cooldown events
|
|
+ this.addCooldown(groupId, duration, true);
|
|
+ }
|
|
+
|
|
+ public void addCooldown(ResourceLocation groupId, int duration, boolean callEvent) {
|
|
+ // Event called in server override
|
|
+ // Paper end - Item cooldown events
|
|
this.cooldowns.put(groupId, new ItemCooldowns.CooldownInstance(this.tickCount, this.tickCount + duration));
|
|
this.onCooldownStarted(groupId, duration);
|
|
}
|