mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-12-25 18:37:43 +01:00
Started the portal loading code
This commit is contained in:
parent
561db2f925
commit
9b6b876bf8
@ -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);
|
||||
|
30
Advanced Portals/src/com/sekwah/advancedportals/Portals.java
Normal file
30
Advanced Portals/src/com/sekwah/advancedportals/Portals.java
Normal 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!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user