Hi,
Is there any ways or examples on how to save a map or list to the Settings class?
Thanks,
saving a map or list as settings
-
- Posts: 24
- Joined: Wed May 26, 2021 12:13 pm
- Has thanked: 2 times
-
- Posts: 552
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 86 times
Re: saving a map or list as settings
Hi,
Just add your map or list to the settings class. Settings class can be just any class. It does not need to implement any interface. Let us know if you need a more detailed info.
Here are module examples. Just add your map or list to the settings class (Settings in Simplified API example, MarkersDemoSettings in Core API example).
Simplified API example
https://github.com/BookmapAPI/DemoStrat ... iDemo.java
Core API example (see MarkersDemoSettings class)
https://github.com/BookmapAPI/DemoStrat ... mo/markers
Just add your map or list to the settings class. Settings class can be just any class. It does not need to implement any interface. Let us know if you need a more detailed info.
Here are module examples. Just add your map or list to the settings class (Settings in Simplified API example, MarkersDemoSettings in Core API example).
Simplified API example
https://github.com/BookmapAPI/DemoStrat ... iDemo.java
Core API example (see MarkersDemoSettings class)
https://github.com/BookmapAPI/DemoStrat ... mo/markers