diff --git a/pom.xml b/pom.xml
index 42f13d59..4821b713 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
Jobs
jobs
- 5.0.2.1
+ 5.0.2.2
Jobs
http://maven.apache.org
diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/stats.java b/src/main/java/com/gamingmesh/jobs/commands/list/stats.java
index 8d285a63..5d50d979 100644
--- a/src/main/java/com/gamingmesh/jobs/commands/list/stats.java
+++ b/src/main/java/com/gamingmesh/jobs/commands/list/stats.java
@@ -1,5 +1,7 @@
package com.gamingmesh.jobs.commands.list;
+import java.util.List;
+
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -44,7 +46,7 @@ public class stats implements Cmd {
String pref = JobsCommands.LABEL + " " + info.class.getSimpleName() + " ";
- for (JobProgression jobProg : jPlayer.progression) {
+ for (JobProgression jobProg : jPlayer.getJobProgression()) {
for (String msg : Jobs.getCommandManager().jobStatsMessage(jobProg).split("\n")) {
new RawMessage().addText(msg).addHover(leftClick).addCommand(pref + jobProg.getJob().getName()).show(sender);
}
diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java b/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java
index 4eab676e..edf865e2 100644
--- a/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java
+++ b/src/main/java/com/gamingmesh/jobs/dao/JobsMySQL.java
@@ -21,6 +21,8 @@ public class JobsMySQL extends JobsDAO {
}
}
+ private String database;
+
JobsMySQL(Jobs plugin, String hostname, String database, String username, String password, String prefix, boolean certificate, boolean ssl, boolean autoReconnect,
String characterEncoding, String encoding) {
super(plugin, path, "jdbc:mysql://" + hostname + "/" + database
@@ -38,6 +40,7 @@ public class JobsMySQL extends JobsDAO {
String characterEncoding, String encoding) {
JobsMySQL dao = new JobsMySQL(plugin, hostname, database, username, password, prefix, certificate, ssl, autoReconnect,
characterEncoding, encoding);
+ this.database = database;
dao.setUp();
return dao;
}
@@ -97,7 +100,7 @@ public class JobsMySQL extends JobsDAO {
return false;
try {
- ResultSet tables = conn.getMetaData().getTables(null, null, table, null);
+ ResultSet tables = conn.getMetaData().getTables(database, null, table, new String[] {"TABLE"});
if (tables.next()) {
tables.close();
return true;