I thought it would be interesting having the feature for updating just 1 item in the inventory, without reloading the entire GUI.
This update doesn't remove the item's listener.
To do that I suggest this change in the method InventoryManager#getOpenedPlayers:
public List<UUID> getOpenedPlayers(SmartInventory inv) {
List<UUID> list = new ArrayList<>();
this.inventories.forEach((player, playerInv) -> {
if (inv.equals(playerInv))
list.add(player);
});
return list;
}
A list of players may cause problems inside InventoryContent's implementation (private method update), making the update impossible.
Hi,
I thought it would be interesting having the feature for updating just 1 item in the inventory, without reloading the entire GUI. This update doesn't remove the item's listener.
To do that I suggest this change in the method
InventoryManager#getOpenedPlayers
:A list of players may cause problems inside InventoryContent's implementation (private method
update
), making the update impossible.