diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java index f7d26c746..1ebae3a93 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/APlotMeConnector.java @@ -13,7 +13,7 @@ import java.util.HashMap; public abstract class APlotMeConnector { - public abstract Connection getPlotMeConnection(FileConfiguration plotConfig, String dataFolder); + public abstract Connection getPlotMeConnection(String plugin, FileConfiguration plotConfig, String dataFolder); public abstract HashMap> getPlotMePlots(Connection connection) throws SQLException; diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java index 92db4f3cf..11cea6ddb 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/ClassicPlotMeConnector.java @@ -26,12 +26,12 @@ import java.util.UUID; public class ClassicPlotMeConnector extends APlotMeConnector { - private String plugin; + private String plugin = "PlotMe"; private String prefix; @Override - public Connection getPlotMeConnection(FileConfiguration plotConfig, String dataFolder) { - this.plugin = this.plugin.toLowerCase(); + public Connection getPlotMeConnection(String plugin, FileConfiguration plotConfig, String dataFolder) { + this.plugin = plugin.toLowerCase(); this.prefix = plotConfig.getString("mySQLprefix", this.plugin.toLowerCase()); try { if (plotConfig.getBoolean("usemySQL")) { diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java index 672b0644b..88e8a5c46 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/LikePlotMeConverter.java @@ -123,7 +123,7 @@ public class LikePlotMeConverter { PS.debug("&3Using connector: " + connector.getClass().getCanonicalName()); - Connection connection = connector.getPlotMeConnection(plotConfig, dataFolder); + Connection connection = connector.getPlotMeConnection(plugin,plotConfig, dataFolder); if (!connector.isValidConnection(connection)) { sendMessage("Cannot connect to PlotMe DB. Conversion process will not continue"); diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java index 124e55594..429248e6b 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/database/plotme/PlotMeConnector_017.java @@ -26,8 +26,8 @@ public class PlotMeConnector_017 extends APlotMeConnector { private String plugin; @Override - public Connection getPlotMeConnection(FileConfiguration plotConfig, String dataFolder) { - this.plugin = this.plugin.toLowerCase(); + public Connection getPlotMeConnection(String plugin, FileConfiguration plotConfig, String dataFolder) { + this.plugin = plugin.toLowerCase(); try { if (plotConfig.getBoolean("usemySQL")) { String user = plotConfig.getString("mySQLuname");