From 59a3833b02c38f83102d73618c8adb6948913101 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 4 May 2019 20:32:13 +1000 Subject: [PATCH] SPIGOT-4860: Cancelling InventoryOpenEvent on MerchantInventory prevents re-opening By: md_5 --- paper-server/nms-patches/InventoryMerchant.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-server/nms-patches/InventoryMerchant.patch b/paper-server/nms-patches/InventoryMerchant.patch index 0d6e606108..1e490c3e60 100644 --- a/paper-server/nms-patches/InventoryMerchant.patch +++ b/paper-server/nms-patches/InventoryMerchant.patch @@ -14,7 +14,7 @@ public class InventoryMerchant implements IInventory { -@@ -12,6 +19,45 @@ +@@ -12,6 +19,46 @@ public int selectedIndex; private int e; @@ -32,6 +32,7 @@ + + public void onClose(CraftHumanEntity who) { + transaction.remove(who); ++ merchant.setTradingPlayer((EntityHuman) null); // SPIGOT-4860 + } + + public List getViewers() {