Using Config API
This commit is contained in:
parent
315eff4349
commit
27851d2982
|
@ -6,7 +6,7 @@ import bentobox.addon.bskyblock.commands.AdminCommand;
|
|||
import bentobox.addon.bskyblock.commands.IslandCommand;
|
||||
import bentobox.addon.bskyblock.generators.BSkyBlockWorld;
|
||||
import world.bentobox.bentobox.api.addons.Addon;
|
||||
import world.bentobox.bentobox.api.configuration.BBConfig;
|
||||
import world.bentobox.bentobox.api.configuration.Config;
|
||||
|
||||
/**
|
||||
* Main BSkyBlock class - provides an island minigame in the sky
|
||||
|
@ -26,7 +26,7 @@ public class BSkyBlock extends Addon {
|
|||
// Save the default config from config.yml
|
||||
saveDefaultConfig();
|
||||
// Load settings from config.yml. This will check if there are any issues with it too.
|
||||
settings = new BBConfig<>(this, Settings.class).loadConfigObject();
|
||||
settings = new Config<>(this, Settings.class).loadConfigObject();
|
||||
// Load or create worlds
|
||||
bsbWorlds = new BSkyBlockWorld(this);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class BSkyBlock extends Addon {
|
|||
public void onDisable() {
|
||||
// Save settings
|
||||
if (settings != null) {
|
||||
new BBConfig<>(this, Settings.class).saveConfigObject(settings);
|
||||
new Config<>(this, Settings.class).saveConfigObject(settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue