mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
SPIGOT-4860: Cancelling InventoryOpenEvent on MerchantInventory prevents re-opening
This commit is contained in:
parent
09a453aede
commit
df82e4f08a
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
public class InventoryMerchant implements IInventory {
|
public class InventoryMerchant implements IInventory {
|
||||||
|
|
||||||
@@ -12,6 +19,45 @@
|
@@ -12,6 +19,46 @@
|
||||||
public int selectedIndex;
|
public int selectedIndex;
|
||||||
private int e;
|
private int e;
|
||||||
|
|
||||||
@ -32,6 +32,7 @@
|
|||||||
+
|
+
|
||||||
+ public void onClose(CraftHumanEntity who) {
|
+ public void onClose(CraftHumanEntity who) {
|
||||||
+ transaction.remove(who);
|
+ transaction.remove(who);
|
||||||
|
+ merchant.setTradingPlayer((EntityHuman) null); // SPIGOT-4860
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public List<HumanEntity> getViewers() {
|
+ public List<HumanEntity> getViewers() {
|
||||||
|
Loading…
Reference in New Issue
Block a user