Skip to content

Instantly share code, notes, and snippets.

@EntityReborn
Created August 10, 2011 04:32
Show Gist options
  • Save EntityReborn/1136126 to your computer and use it in GitHub Desktop.
Save EntityReborn/1136126 to your computer and use it in GitHub Desktop.
>>> pprint.pprint(server.api.call("getPlayers"))
[{u'health': 20,
u'inVehicle': False,
u'inventory': {u'armor': {u'boots': {u'amount': 0,
u'durability': -1,
u'type': 0},
u'chestplate': {u'amount': 0,
u'durability': -1,
u'type': 0},
u'helmet': {u'amount': 0,
u'durability': -1,
u'type': 0},
u'leggings': {u'amount': 0,
u'durability': -1,
u'type': 0}},
u'hand': {u'amount': 3, u'durability': 2, u'type': 44},
u'inventory': [{u'amount': 3,
u'durability': 2,
u'type': 44},
{u'amount': 1,
u'durability': 0,
u'type': 278},
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None]},
u'ip': u'/189.222.243.125:18937',
u'itemInHand': {u'amount': 3, u'durability': 2, u'type': 44},
u'location': {u'pitch': -10.349973,
u'x': 62.28125,
u'y': 82.0,
u'yaw': 98.24764,
u'z': 133.78125},
u'name': u'__import__',
u'op': False,
u'sleeping': False,
u'sneaking': False,
u'world': 0,
u'worldInfo': {u'environment': u'normal',
u'fullTime': 95929373,
u'name': u'Sparticus2',
u'time': 1373}}]
>>> pprint.pprint(server.api.call("getWorlds"))
[{u'environment': u'normal',
u'fullTime': 95931663,
u'name': u'Sparticus2',
u'time': 3663},
{u'environment': u'nether',
u'fullTime': 92076071,
u'name': u'Sparticus2_nether',
u'time': 12071}]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment