geforkt von Mirrors/Paper
Do not crash when an exp orb attempts to mend an unrepairable item
Dieser Commit ist enthalten in:
Ursprung
8c6ba348c9
Commit
69258a8c33
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// CraftBukkit start
|
||||
- org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k);
|
||||
+ // Paper start - mending event
|
||||
+ final int consumedExperience = k * amount / j;
|
||||
+ final int consumedExperience = k > 0 ? k * amount / j : 0;
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k, consumedExperience);
|
||||
+ // Paper end - mending event
|
||||
k = event.getRepairAmount();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren