aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0170-Ability-to-apply-mending-to-XP-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0170-Ability-to-apply-mending-to-XP-API.patch')
-rw-r--r--patches/server/0170-Ability-to-apply-mending-to-XP-API.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0170-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0170-Ability-to-apply-mending-to-XP-API.patch
index 4adad63f75..01a9b6f752 100644
--- a/patches/server/0170-Ability-to-apply-mending-to-XP-API.patch
+++ b/patches/server/0170-Ability-to-apply-mending-to-XP-API.patch
@@ -10,7 +10,7 @@ of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index dd86f2055af67f35a5d265b78e99b12e7b7926ad..9f959cbb6e8685dacccec1d8df68d4a8a94ab81e 100644
+index 6dd5deecd404a3b9858e63da6837caf2d5d382f0..a08c03bb984d27ded2979353f207693fb79d4256 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1444,7 +1444,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -32,7 +32,7 @@ index dd86f2055af67f35a5d265b78e99b12e7b7926ad..9f959cbb6e8685dacccec1d8df68d4a8
+ orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
+
+ int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
-+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, i);
++ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i);
+ i = event.getRepairAmount();
+ orb.discard();
+ if (!event.isCancelled()) {