package net.benjidial.nswp; import net.benjidial.nswp.commands.*; import org.bukkit.plugin.java.JavaPlugin; import java.util.logging.Logger; import java.util.logging.Level; import java.sql.SQLException; import java.io.File; public class Plugin extends JavaPlugin { public static Logger logger; public void onEnable() { logger = getLogger(); getDataFolder().mkdirs(); try { Database.connect(new File(getDataFolder(), "database.db").getPath()); } catch (SQLException ex) { logger.log(Level.SEVERE, "Database error: (not enabling plugin)"); ex.printStackTrace(); return; } getCommand("wlist").setExecutor(new ListWaypoints()); getCommand("wsave").setExecutor(new SaveWaypoint()); getCommand("wtp" ).setExecutor(new TeleportToWaypoint()); getCommand("wdel" ).setExecutor(new DeleteWaypoint()); getCommand("wback").setExecutor(new WaypointBack()); } }