Started the portal loading code

This commit is contained in:
sekwah41 2013-11-02 20:02:29 +00:00
parent 561db2f925
commit 9b6b876bf8
2 changed files with 32 additions and 0 deletions

View File

@ -14,6 +14,8 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
ConfigAccessor config = new ConfigAccessor(this, "Config.yml");
config.saveDefaultConfig();
// Loads the current portal data
new Portals(this);
// These register the commands
new AdvancedPortalsCommand(this);

View File

@ -0,0 +1,30 @@
package com.sekwah.advancedportals;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
public class Portals {
private final AdvancedPortalsPlugin plugin;
public Portals(AdvancedPortalsPlugin plugin) {
this.plugin = plugin;
this.loadPortalData();
}
public void loadPortalData(){
ConfigAccessor config = new ConfigAccessor(plugin, "Portals.yml");
List<?> portallist = config.getConfig().getList("portals");
if(portallist.size() > 0){
}
else{
plugin.getLogger().log(Level.INFO, "There are currently no portals!");
}
}
}