Quick fix damage event
This commit is contained in:
parent
2faef00909
commit
6a61d27c10
@ -19,7 +19,7 @@ index 3043db9..8925327 100644
|
|||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ if (entityliving instanceof EntityPlayer) {
|
+ if (entityliving instanceof EntityPlayer) {
|
||||||
+ org.bukkit.craftbukkit.inventory.CraftItemStack item = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this);
|
+ 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);
|
+ org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) return;
|
+ if (event.isCancelled()) return;
|
||||||
+ i = event.getDamage();
|
+ i = event.getDamage();
|
||||||
|
Loading…
Reference in New Issue
Block a user