3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Quick fix damage event

Dieser Commit ist enthalten in:
md-5 2013-03-05 07:22:03 +11:00
Ursprung 2faef00909
Commit 6a61d27c10

Datei anzeigen

@ -19,7 +19,7 @@ index 3043db9..8925327 100644
+ // Spigot start
+ if (entityliving instanceof EntityPlayer) {
+ org.bukkit.craftbukkit.inventory.CraftItemStack item = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this);
+ org.bukkit.event.player.PlayerItemDamageEvent event = new org.bukkit.event.player.PlayerItemDamageEvent((org.bukkit.entity.Player) entityliving.getBukkitEntity(), item, damage);
+ org.bukkit.event.player.PlayerItemDamageEvent event = new org.bukkit.event.player.PlayerItemDamageEvent((org.bukkit.entity.Player) entityliving.getBukkitEntity(), item, i);
+ org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) return;
+ i = event.getDamage();