Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 1005 Bytes

use-data-source.md

File metadata and controls

10 lines (7 loc) · 1005 Bytes

Slime World Manager supports three data sources out of the box: the filesystem, MySQL and MongoDB. However, there are situations where you might want to use other data sources. To do so, you can create your own implementation of the SlimeLoader interface.

SlimeLoaders are classes used to load worlds from specific data sources. Remember to check out the docs for the SlimeLoader interface prior to creating your own implementation, as it contains information on what every method should exactly do. You can also take a look at the FileLoader class for an example of a SlimeLoader.

Once you've got your own SlimeLoader, remember to register it so you can use it later:

SlimePlugin plugin = (SlimePlugin) Bukkit.getPluginManager().getPlugin("SlimeWorldManager");

plugin.registerLoader("my_data_source", new MyCustomSlimeLoader());