Skip to content

Commit

Permalink
Fix bug with example script (credit to @Felleus on Discord)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmq committed May 18, 2024
1 parent 057e0f0 commit b8d6cd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/communitychest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def save_inventory():
inventory_config.set(key, None)

items = inventory.getContents()
for item in items:
for index, item in enumerate(items):
if item is not None and item.getType() is not Material.AIR:
inventory_config.set(int(items.index(item)), item)
inventory_config.set(str(index), item)

inventory_config.save()

Expand Down

0 comments on commit b8d6cd3

Please sign in to comment.