Skip to content

Add slot for inventory PUTting #105

@oblx

Description

@oblx

Modifying inventories is awesome but it doesn't take slot index in account.

When I GET player inventory and then PUT it back then all items are still there but they are sorted from the very first slot in the inventory and not in the action bar.

Maybe it would be possible to add a "slot" option ?

{
"inventory": [{
      "type": {"id": "minecraft:stone"},
	  "quantity": 2
	  },{
      "type": {"id": "minecraft:tipped_arrow"},
      "quantity": 1
	  }, {
      "type": {"id": "minecraft:enchanted_book"},
      "quantity": 1
	  }]
}

Becomes :

{
"inventory": [{
      "type": {"id": "minecraft:stone"},
	  "quantity": 2,
	  "slot": 5
	  },{
      "type": {"id": "minecraft:tipped_arrow"},
      "quantity": 1,
	  "slot": 8
	  }, {
      "type": {"id": "minecraft:enchanted_book"},
      "quantity": 1,
	  "slot": 0
	  }]
}

Edit : here is what I mean http://wiki.vg/File:Inventory-slots.png

Metadata

Metadata

Assignees

Labels

enhancementNew feature for the Web-API

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions