Feature inquiry: Ability to save variable arrays to vars.yml or other file
gmalone opened this issue ยท 2 comments
When it comes to using arrays for indexed lists, single simple variables are not adequate.
This may have been asked before, but I couldn't find it.
Could TR be made to save an array of values?
Example:
`biomes = array(10)
biomes[0] = "OCEAN"
biomes[1] = "PLAINS"
biomes[2] = "DESERT"
biomes[3] = "MOUNTAINS"
biomes[4] = "FOREST"
biomes[5] = "TAIGA"
biomes[6] = "SWAMPLAND"
biomes[7] = "RIVER"
biomes[8] = "NETHER"
biomes[9] = "THE_END"
#CMDCON "trg vars BIOMES biomes."+biomes`
... or similar, and have the array values saved and accessible for later use.
Sounds good
Just letting you know that we will be able to do this as soon as refactoring is done
The one reason why it's not straight forward to implement is how the yaml API of Bukkit works (since they only support List to be serialized/deserialized, the conversion is quite troublesome.)
The refactoring includes the task of changing serializer from yaml to json format, then it would provide a more flexible environment and also better performance.
Sweet! Thanks @wysohn Much to look forward to!