readd dropped event in InteractWithDoor

This commit is contained in:
Lulu13022002
2024-12-16 17:29:46 +01:00
parent 9c973e84bc
commit 783b3b70e6
33 changed files with 175 additions and 172 deletions

View File

@@ -12,12 +12,12 @@
+ return this.itemStacks;
+ }
+
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.add(who);
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+ this.transaction.add(player);
+ }
+
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.remove(who);
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+ this.transaction.remove(player);
+ this.merchant.setTradingPlayer((Player) null); // SPIGOT-4860
+ }
+

View File

@@ -21,8 +21,8 @@
+ }
+
+ // Don't need a transaction; the InventoryCrafting keeps track of it for us
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {}
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {}
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {}
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {}
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return new java.util.ArrayList<>();
+ }

View File

@@ -15,16 +15,16 @@
+ return this.items;
+ }
+
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.add(who);
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+ this.transaction.add(player);
+ }
+
+ public org.bukkit.event.inventory.InventoryType getInvType() {
+ return this.items.size() == 4 ? org.bukkit.event.inventory.InventoryType.CRAFTING : org.bukkit.event.inventory.InventoryType.WORKBENCH;
+ }
+
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.remove(who);
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+ this.transaction.remove(player);
+ }
+
+ public List<org.bukkit.entity.HumanEntity> getViewers() {