Just Another Spawner

Just Another Spawner

665k Downloads

Optional Parameters for JAS Commands

Crudedragos opened this issue ยท 0 comments

commented

Consider using JCommander. Open Source, Apache 2.0. http://jcommander.org/#Overview

Instead of set formats to follow. A /jas command would simply be command name + =optional arguments. mandatory args could still be there.

I.e. instead of /jas countcap instead of

/jas countcap <targetPlayer / DimensionID> <EntityType>
/jas countcap <EntityType>
/jas countcap

It would utilize three optional parameters. -type, -player, -dimension: which can be placed in any order. Each could be aliased easily: type, creaturetype, t, etc. Defaults assumed if absent i.e. type is *, player is caller. Different args for player and dimension for easy parsing (One defaults over other with logging of crouse). Auto-complete would provide list of valid fields.
i.e.

/jas countcap  -player "SAM WISE" -type CREATURE -dim 2
/jas countcap  -dim 2 -type CREATURE
/jas countcap -type MONSTER -player "SAM WISE"
/jas countcap