Fix a crash on some machines
This commit is contained in:
parent
90b565131a
commit
9ef4aafb55
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>net.seanomik</groupId>
|
||||
<artifactId>tamablefoxes</artifactId>
|
||||
<version>1.7.8-SNAPSHOT</version>
|
||||
<version>1.7.9-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Tamablefoxes</name>
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.bukkit.plugin.java.JavaPlugin;
|
|||
|
||||
// @TODO:
|
||||
|
||||
/* @CHANGELOG (1.7.8-SNAPSHOT):
|
||||
* Add a permission to allow players to bypass the tame limit.
|
||||
/* @CHANGELOG (1.7.9-SNAPSHOT):
|
||||
* Fix some crashes and errors with the sqlite database failing to be found.
|
||||
*/
|
||||
public final class TamableFoxes extends JavaPlugin implements Listener {
|
||||
private static TamableFoxes plugin;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.seanomik.tamablefoxes.io.sqlite;
|
||||
|
||||
import net.seanomik.tamablefoxes.TamableFoxes;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
@ -21,10 +22,8 @@ public class SQLiteHandler {
|
|||
|
||||
public void connect() {
|
||||
try {
|
||||
String baseLoc = Bukkit.getWorldContainer().toURI().toString().substring(6);
|
||||
baseLoc = baseLoc.substring(0,baseLoc.length()-2);
|
||||
|
||||
String url = "jdbc:sqlite:" + baseLoc + "plugins/Tamablefoxes/userFoxAmount.db";
|
||||
String pluginFolder = TamableFoxes.getPlugin().getDataFolder().getAbsolutePath();
|
||||
String url = "jdbc:sqlite:" + pluginFolder + "/userFoxAmount.db";
|
||||
connection = DriverManager.getConnection(url);
|
||||
|
||||
} catch (SQLException e) {
|
||||
|
|
Loading…
Reference in New Issue