mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 11:30:36 +01:00
Quick fix damage event
By: md-5 <md_5@live.com.au>
This commit is contained in:
parent
cbbd6b577d
commit
e514a12e83
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue