#Multi config data

1 messages · Page 1 of 1 (latest)

woven flower
#

@ancient night

#

so basically the way I have it done now is inside my plugin class which is basically static I have a datastorage class which holds some data managers

ancient night
#

Configuration data or other data?

woven flower
#

like im making a bingo plugin so I have different data files to store options and card items etc

ancient night
#

There’s a big diff

woven flower
#

well

#

its data thats used to set up the game but is also written to during it

ancient night
#

Config data has a pre determined format, and usually only has to be read once during startup

woven flower
#

no its not config data

ancient night
#

Other data, like general data is read/write data

woven flower
#

I have a separate ConfigData class for my general options

#

this is more for stuff like storing what items can appear on bingo cards etc

#

so the general way I access that is some like MyPlugin.data().cards().getSavedItems()

#

this is an example of whats inside the items file yml default_items: tasks: - ==: Bingo.ItemTask item: LOOM count: 1 - ==: Bingo.ItemTask item: ECHO_SHARD count: 1 - ==: Bingo.ItemTask item: HANGING_ROOTS count: 1 - ==: Bingo.ItemTask item: NOTE_BLOCK count: 4 - ==: Bingo.ItemTask item: MANGROVE_WOOD count: 1 - ==: Bingo.ItemTask item: FISHING_ROD count: 1 - ==: Bingo.ItemTask item: SNOW_BLOCK count: 1 - ==: Bingo.ItemTask item: POISONOUS_POTATO count: 1 - ==: Bingo.ItemTask item: WATER_BUCKET count: 1 - ==: Bingo.ItemTask item: DEAD_BUSH count: 1 - ==: Bingo.ItemTask item: BLUE_CONCRETE count: 1

#

so then when you want to play a game the card gets made from these items

#

and then I also have a way for the player to add items to this list through the plugin with commands and gui and stuf