Skip to content

Commit

Permalink
Try to fix #36 (not tested yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKube committed Dec 21, 2018
1 parent 42316d9 commit bf8e766
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/fr/minuskube/inv/content/InventoryContents.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,11 @@ public InventoryContents setProperty(String name, Object value) {
}

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

if(topInventory != null)
topInventory.setItem(inv.getColumns() * row + column, item);
Inventory topInventory = player.getOpenInventory().getTopInventory();
topInventory.setItem(inv.getColumns() * row + column, item);
}

}
Expand Down

0 comments on commit bf8e766

Please sign in to comment.