mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-13 22:25:31 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/ContainerMerchant.java 2014-11-28 17:43:43.017707437 +0000
|
|
+++ src/main/java/net/minecraft/server/ContainerMerchant.java 2014-11-28 17:38:16.000000000 +0000
|
|
@@ -1,10 +1,25 @@
|
|
package net.minecraft.server;
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
|
+
|
|
public class ContainerMerchant extends Container {
|
|
|
|
private IMerchant merchant;
|
|
private InventoryMerchant f;
|
|
private final World g;
|
|
+
|
|
+ // CraftBukkit start
|
|
+ private CraftInventoryView bukkitEntity = null;
|
|
+ private PlayerInventory player;
|
|
+
|
|
+ @Override
|
|
+ public CraftInventoryView getBukkitView() {
|
|
+ if (bukkitEntity == null) {
|
|
+ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new org.bukkit.craftbukkit.inventory.CraftInventoryMerchant((InventoryMerchant) f), this);
|
|
+ }
|
|
+ return bukkitEntity;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
|
|
public ContainerMerchant(PlayerInventory playerinventory, IMerchant imerchant, World world) {
|
|
this.merchant = imerchant;
|
|
@@ -13,6 +28,7 @@
|
|
this.a(new Slot(this.f, 0, 36, 53));
|
|
this.a(new Slot(this.f, 1, 62, 53));
|
|
this.a((Slot) (new SlotMerchantResult(playerinventory.player, imerchant, this.f, 2, 120, 53)));
|
|
+ this.player = playerinventory; // CraftBukkit - save player
|
|
|
|
int i;
|
|
|