playertfc only usable on "self" by operator
mjevans opened this issue ยท 1 comments
As observed on the TFC Tuesday streams, the playertfc command is only usable on the current player (an operator). The interface does not allow use on other players and thus does not work either manually for resolving issues, nor as part of automated command blocks (E.G. to catch new players up on a running server).
The signature for the command should probably be similar to vanilla's experience / command.
E.G. https://minecraft.gamepedia.com/Commands/experience
experience add <targets> <amount> [levels|points]
experience set <targets> <amount> [levels|points]
experience query <targets> (levels|points)
xp add <targets> <amount> [levels|points]
xp set <targets> <amount> [levels|points]
xp query <targets> (levels|points)
Currently player tfc partly tab completes
/playertfc <get|set|add|reset> <food|nutrition|saturation|skill|water> ...
/playertfc get skill (Does not list all skills, does not tab-complete)
Suggested syntax:
/playertfc get <target> skill <skillname> -- (get+3) Single skill
/playertfc get <target> skill -- (get+2) All skills
/playertfc get skill <skillname> -- (get+2) Single skill (self)
/playertfc get skill -- (get+1) All skills (self)
/playertfc set <target> skill <skillname> <float> -- (set+4) Single skill
/playertfc set skill <skillname> <float> -- (set+3) Single skill (self)
Notably the command type should be processed first, then the argument length. If the 'long' version should be handled the same way any entity selector is for normal commands: a List/Iterable of zero or more targets based on the target selector.
<float>, when invalid or out of validated range, should inform the operator what the valid range is.
E.G. for set, 0.0 to 4.0, or for 'add', a result in the range of 0.0 to 4.0, current value 2.0 thus current valid inputs -2.0 to 2.0.