mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Fix SPIGOT-528: Incorrect owner for merchant inventories.
This commit is contained in:
parent
0cf233dd6d
commit
9ae33818af
1 changed files with 7 additions and 6 deletions
|
@ -1,18 +1,19 @@
|
|||
--- ../work/decompile-8eb82bde//net/minecraft/server/InventoryMerchant.java 2014-11-28 17:43:43.209707433 +0000
|
||||
+++ src/main/java/net/minecraft/server/InventoryMerchant.java 2014-11-28 17:38:23.000000000 +0000
|
||||
@@ -1,5 +1,11 @@
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100
|
||||
+++ src/main/java/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100
|
||||
@@ -1,5 +1,12 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.craftbukkit.entity.CraftVillager;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class InventoryMerchant implements IInventory {
|
||||
|
||||
private final IMerchant merchant;
|
||||
@@ -8,6 +14,35 @@
|
||||
@@ -8,6 +15,35 @@
|
||||
private MerchantRecipe recipe;
|
||||
private int e;
|
||||
|
||||
|
@ -41,14 +42,14 @@
|
|||
+ }
|
||||
+
|
||||
+ public org.bukkit.inventory.InventoryHolder getOwner() {
|
||||
+ return player.getBukkitEntity();
|
||||
+ return (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) {
|
||||
this.player = entityhuman;
|
||||
this.merchant = imerchant;
|
||||
@@ -94,7 +129,7 @@
|
||||
@@ -94,7 +130,7 @@
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
|
|
Loading…
Reference in a new issue