diff --git a/src/main/java/world/bentobox/bentobox/database/DatabaseSetup.java b/src/main/java/world/bentobox/bentobox/database/DatabaseSetup.java index 6342cc1cf..437cfbf1e 100644 --- a/src/main/java/world/bentobox/bentobox/database/DatabaseSetup.java +++ b/src/main/java/world/bentobox/bentobox/database/DatabaseSetup.java @@ -19,7 +19,7 @@ public interface DatabaseSetup { /** * Gets the type of database being used. * Currently supported options are YAML, JSON, MYSQL, MARIADB and MONGODB. - * Default is YAML. + * Default is JSON. * @return Database type */ static DatabaseSetup getDatabase() { diff --git a/src/main/java/world/bentobox/bentobox/database/mysql/MySQLDatabaseHandler.java b/src/main/java/world/bentobox/bentobox/database/mysql/MySQLDatabaseHandler.java index 4d23b0705..cc7ad3162 100644 --- a/src/main/java/world/bentobox/bentobox/database/mysql/MySQLDatabaseHandler.java +++ b/src/main/java/world/bentobox/bentobox/database/mysql/MySQLDatabaseHandler.java @@ -18,6 +18,7 @@ import org.bukkit.scheduler.BukkitTask; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; +import org.eclipse.jdt.annotation.NonNull; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.database.DatabaseConnector; import world.bentobox.bentobox.database.json.AbstractJSONDatabaseHandler; @@ -149,7 +150,7 @@ public class MySQLDatabaseHandler extends AbstractJSONDatabaseHandler { } @Override - public T loadObject(String uniqueId) { + public T loadObject(@NonNull String uniqueId) { String sb = "SELECT `json` FROM `" + dataObject.getCanonicalName() + "` WHERE uniqueId = ? LIMIT 1"; try (PreparedStatement preparedStatement = connection.prepareStatement(sb)) { // UniqueId needs to be placed in quotes