From e06ee55259b3549a59358a13c095a274bacf6a05 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 30 Dec 2023 14:24:46 -0500 Subject: testing new version --- src/main/java/net/benjidial/nswp/Plugin.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main/java/net/benjidial/nswp/Plugin.java') diff --git a/src/main/java/net/benjidial/nswp/Plugin.java b/src/main/java/net/benjidial/nswp/Plugin.java index 45509a7..94c652e 100644 --- a/src/main/java/net/benjidial/nswp/Plugin.java +++ b/src/main/java/net/benjidial/nswp/Plugin.java @@ -5,7 +5,6 @@ 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; @@ -13,23 +12,30 @@ 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()); + Database.createWBacks(); + Database.createTPATable(); } catch (SQLException ex) { - logger.log(Level.SEVERE, "Database error: (not enabling plugin)"); + logger.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()); + getCommand("wtpallow").setExecutor(new AllowTPA()); + getCommand("wdel").setExecutor(new DeleteWaypoint()); + getCommand("wtpdeny").setExecutor(new DenyTPA()); + getCommand("wlist").setExecutor(new ListWaypoints()); getCommand("wrename").setExecutor(new RenameWaypoint()); + getCommand("wsave").setExecutor(new SaveWaypoint()); + getCommand("wtp").setExecutor(new TeleportToWaypoint()); + getCommand("wtpa").setExecutor(new TPA()); + getCommand("wback").setExecutor(new WaypointBack()); + } } -- cgit v1.2.3