Compiler issues v3

This commit is contained in:
Bjarne Koll
2024-10-25 14:55:49 +02:00
parent c6a0ad379d
commit 319032e137
20 changed files with 89 additions and 59 deletions

View File

@@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - Add PlayerItemCooldownEvent
+ @Override
+ public void addCooldown(Item item, int duration) {
+ io.papermc.paper.event.player.PlayerItemCooldownEvent event = new io.papermc.paper.event.player.PlayerItemCooldownEvent(this.player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemType.minecraftToBukkit(item), duration);
+ public void addCooldown(ItemStack item, int duration) {
+ io.papermc.paper.event.player.PlayerItemCooldownEvent event = new io.papermc.paper.event.player.PlayerItemCooldownEvent(this.player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemType.minecraftToBukkit(item.getItem()), duration);
+ if (event.callEvent()) {
+ super.addCooldown(item, event.getCooldown());
+ }