diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index f3a1859a1c..bc5ec42a54 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -439,6 +439,14 @@ public class CraftInventory implements Inventory { this.clear(i); } } + // Paper start + @Override + public int close() { + int count = this.inventory.getViewers().size(); + com.google.common.collect.Lists.newArrayList(this.inventory.getViewers()).forEach(HumanEntity::closeInventory); + return count; + } + // Paper end @Override public ListIterator iterator() {