Skip to content

Commit bf8e766

Browse files
committed
Try to fix #36 (not tested yet)
1 parent 42316d9 commit bf8e766

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/fr/minuskube/inv/content/InventoryContents.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ public InventoryContents setProperty(String name, Object value) {
234234
}
235235

236236
private void update(int row, int column, ItemStack item) {
237-
Inventory topInventory = player.getOpenInventory().getTopInventory();
237+
if(!inv.getManager().getOpenedPlayers(inv).contains(player))
238+
return;
238239

239-
if(topInventory != null)
240-
topInventory.setItem(inv.getColumns() * row + column, item);
240+
Inventory topInventory = player.getOpenInventory().getTopInventory();
241+
topInventory.setItem(inv.getColumns() * row + column, item);
241242
}
242243

243244
}

0 commit comments

Comments
 (0)