In ClickableInventory.updateInventory(), in the foreach loop through openInventories.entrySet(), it calls showInventory(Player) which modifies openInventories.
This makes a list copy of the entrySet so the iterator doesn't get mad.
Also made the openInventory call safe according to Paper's InventoryClick/DragEvent docs
So... technically the arraylist copy is redundant with both changes...
In ClickableInventory.updateInventory(), in the foreach loop through openInventories.entrySet(), it calls showInventory(Player) which modifies openInventories. This makes a list copy of the entrySet so the iterator doesn't get mad. Also made the openInventory call safe according to Paper's InventoryClick/DragEvent docs
So... technically the arraylist copy is redundant with both changes...