Inventory#close

This commit is contained in:
Jake Potrebic 2021-05-11 14:54:56 -07:00
parent c8c11363a0
commit b70d1e8bdc

View file

@ -439,6 +439,14 @@ public class CraftInventory implements Inventory {
this.clear(i); 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 @Override
public ListIterator<ItemStack> iterator() { public ListIterator<ItemStack> iterator() {