mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 04:05:36 +01:00
Small adjustments in BSkyBlock main class
This commit is contained in:
parent
5c6901d71c
commit
756b7eaff2
@ -47,12 +47,12 @@ public class BSkyBlock extends JavaPlugin {
|
||||
// Metrics
|
||||
private Metrics metrics;
|
||||
|
||||
// Commands
|
||||
private IslandCommand islandCommand;
|
||||
private AdminCommand adminCommand;
|
||||
|
||||
protected LocaleManager localeManager;
|
||||
|
||||
private AdminCommand adminCommand;
|
||||
|
||||
@Override
|
||||
public void onEnable(){
|
||||
plugin = this;
|
||||
@ -63,10 +63,8 @@ public class BSkyBlock extends JavaPlugin {
|
||||
playersManager = new PlayersManager(this);
|
||||
islandsManager = new IslandsManager(this);
|
||||
// Only load metrics if set to true in config
|
||||
if(Settings.metrics) metrics = new Metrics(plugin);
|
||||
|
||||
// If metrics are loaded, register the custom data charts
|
||||
if(metrics != null){
|
||||
if(Settings.metrics) {
|
||||
metrics = new Metrics(plugin);
|
||||
registerCustomCharts();
|
||||
}
|
||||
|
||||
@ -98,10 +96,9 @@ public class BSkyBlock extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// Load islands from database
|
||||
// Load islands from database
|
||||
islandsManager.load();
|
||||
|
||||
// Load schematics
|
||||
// TODO: load these from config.yml
|
||||
Settings.chestItems = new ItemStack[] {
|
||||
new ItemStack(Material.LAVA_BUCKET,1),
|
||||
@ -115,9 +112,6 @@ public class BSkyBlock extends JavaPlugin {
|
||||
Settings.defaultLanguage = "en-US";
|
||||
localeManager = new LocaleManager(plugin);
|
||||
|
||||
|
||||
|
||||
|
||||
// Register Listeners
|
||||
registerListeners();
|
||||
/*
|
||||
@ -143,10 +137,7 @@ public class BSkyBlock extends JavaPlugin {
|
||||
}
|
||||
}, Settings.databaseBackupPeriod, Settings.databaseBackupPeriod);
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -156,7 +147,7 @@ public class BSkyBlock extends JavaPlugin {
|
||||
return islandCommand;
|
||||
}
|
||||
|
||||
protected void registerListeners() {
|
||||
private void registerListeners() {
|
||||
PluginManager manager = getServer().getPluginManager();
|
||||
// Player join events
|
||||
manager.registerEvents(new JoinLeaveListener(this), this);
|
||||
|
Loading…
Reference in New Issue
Block a user