Fix PlayerItemDamageEvent
Hopefully a temporary patch as I've already submitted it to SpigotMC But I kinda wanna use the event now so... Here we are
This commit is contained in:
parent
e4e58b88a0
commit
0b4479373d
1 changed files with 21 additions and 0 deletions
21
Spigot-Server-Patches/Fix-PlayerItemDamageEvent.patch
Normal file
21
Spigot-Server-Patches/Fix-PlayerItemDamageEvent.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||||
|
Date: Thu, 24 Jul 2014 22:23:38 -0500
|
||||||
|
Subject: [PATCH] Fix PlayerItemDamageEvent
|
||||||
|
|
||||||
|
Taken from SpigotMC/Spigot PR#202
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
|
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||||
|
public void damage(int i, EntityLiving entityliving) {
|
||||||
|
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
||||||
|
if (this.g()) {
|
||||||
|
- if (this.isDamaged(i, entityliving.aI())) {
|
||||||
|
+ if (this.isDamaged(i, entityliving.aI(), entityliving)) {
|
||||||
|
entityliving.a(this);
|
||||||
|
--this.count;
|
||||||
|
if (entityliving instanceof EntityHuman) {
|
||||||
|
--
|
Loading…
Add table
Add a link
Reference in a new issue