mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Inventory#close
This commit is contained in:
parent
c8c11363a0
commit
b70d1e8bdc
1 changed files with 8 additions and 0 deletions
|
@ -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<ItemStack> iterator() {
|
||||
|
|
Loading…
Reference in a new issue