CommandHelper

CommandHelper

46.5k Downloads

Readable pinfo() arguments OR more pfunctions

LadyCailinBot opened this issue ยท 2 comments

commented

CMDHELPER-3110 - Reported by PseudoKnight

The second parameter shouldn't just take integers, but also words signifying the data returned -- pinfo(player(), 'sprinting') instead of pinfo(player(), 19). The latter is hard to remember sometimes, and unless commented it's harder to read. Some of these are useless, since there's functions for them, but others not so much. An alternative would be to add the missing player functions for each of these.

Proposed index names:

  • 0: 'name'
  • 1: 'location'
  • 2: 'cursor'
  • 3: 'ip' (no function)
  • 4: 'displayname'
  • 5: 'health'
  • 6: 'item'
  • 7: 'world'
  • 8: 'isop' or 'op'
  • 9: 'groups'
  • 10: 'hostname' (no function)
  • 11: 'sneaking'
  • 12: 'host' (no function)
  • 13 and 20: 'uuid'
  • 14: 'riding' or 'vehicle'
  • 15: 'slot'
  • 16: 'sleeping' (no function)
  • 17: 'blocking' (no function)
  • 18: 'flying' (no function)
  • 19: 'sprinting' (no function)
commented

Comment by LadyCailin

I am ok with adding an enum for this. I've thought this exact same thing before.

commented

Comment by jb_aero

I would like this as well, and for get_server_info