Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Fix SPIGOT-528: Incorrect owner for merchant inventories.
Dieser Commit ist enthalten in:
Ursprung
0cf233dd6d
Commit
9ae33818af
@ -1,18 +1,19 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/InventoryMerchant.java 2014-11-28 17:43:43.209707433 +0000
|
--- ../work/decompile-8eb82bde/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100
|
||||||
+++ src/main/java/net/minecraft/server/InventoryMerchant.java 2014-11-28 17:38:23.000000000 +0000
|
+++ src/main/java/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100
|
||||||
@@ -1,5 +1,11 @@
|
@@ -1,5 +1,12 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||||
|
+import org.bukkit.craftbukkit.entity.CraftVillager;
|
||||||
+import org.bukkit.entity.HumanEntity;
|
+import org.bukkit.entity.HumanEntity;
|
||||||
+// CraftBukkit end
|
+// CraftBukkit end
|
||||||
+
|
+
|
||||||
public class InventoryMerchant implements IInventory {
|
public class InventoryMerchant implements IInventory {
|
||||||
|
|
||||||
private final IMerchant merchant;
|
private final IMerchant merchant;
|
||||||
@@ -8,6 +14,35 @@
|
@@ -8,6 +15,35 @@
|
||||||
private MerchantRecipe recipe;
|
private MerchantRecipe recipe;
|
||||||
private int e;
|
private int e;
|
||||||
|
|
||||||
@ -41,14 +42,14 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public org.bukkit.inventory.InventoryHolder getOwner() {
|
+ public org.bukkit.inventory.InventoryHolder getOwner() {
|
||||||
+ return player.getBukkitEntity();
|
+ return (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity();
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) {
|
public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) {
|
||||||
this.player = entityhuman;
|
this.player = entityhuman;
|
||||||
this.merchant = imerchant;
|
this.merchant = imerchant;
|
||||||
@@ -94,7 +129,7 @@
|
@@ -94,7 +130,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxStackSize() {
|
public int getMaxStackSize() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren