summaryrefslogtreecommitdiff
path: root/src/main/java/net/benjidial/nswp/Plugin.java
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2023-12-30 14:24:46 -0500
committerBenji Dial <benji@benjidial.net>2023-12-30 14:24:46 -0500
commite06ee55259b3549a59358a13c095a274bacf6a05 (patch)
treea6e8b1b33434ee2c7de7028d4abad77b7fbe8296 /src/main/java/net/benjidial/nswp/Plugin.java
parentef65431d405a713b138a55054e78497883f27e54 (diff)
downloadnew-simple-waypoints-e06ee55259b3549a59358a13c095a274bacf6a05.tar.gz
testing new version
Diffstat (limited to 'src/main/java/net/benjidial/nswp/Plugin.java')
-rw-r--r--src/main/java/net/benjidial/nswp/Plugin.java20
1 files changed, 13 insertions, 7 deletions
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());
+
}
}