Add PlayerItemCooldownEvent

This commit is contained in:
Nassim Jahnke
2020-08-25 13:48:33 +02:00
parent 791377732e
commit d1d54d35bf
3 changed files with 60 additions and 1 deletions

View File

@@ -619,7 +619,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
ItemCooldowns.CooldownInstance cooldown = this.getHandle().getCooldowns().cooldowns.get(group);
return (cooldown == null) ? 0 : Math.max(0, cooldown.endTime - this.getHandle().getCooldowns().tickCount);
return (cooldown == null) ? 0 : Math.max(0, cooldown.endTime() - this.getHandle().getCooldowns().tickCount);
}
@Override