mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-11 14:55:38 +00:00
Added database command
This commit is contained in:
parent
0017b73bdb
commit
8f8fa01389
8 changed files with 233 additions and 56 deletions
|
@ -1252,15 +1252,15 @@ public class PlotMain extends JavaPlugin {
|
|||
return plots;
|
||||
}
|
||||
|
||||
public static void setAllPlotsRaw(final LinkedHashMap<String, HashMap<PlotId, Plot>> plots) {
|
||||
PlotMain.plots = plots;
|
||||
}
|
||||
|
||||
public static void setAllPlotsRaw(final HashMap<String, HashMap<PlotId, Plot>> plots) {
|
||||
PlotMain.plots = new LinkedHashMap<>(plots);
|
||||
// PlotMain.plots.putAll(plots);
|
||||
}
|
||||
|
||||
public static void setAllPlotsRaw(final LinkedHashMap<String, HashMap<PlotId, Plot>> plots) {
|
||||
PlotMain.plots = plots;
|
||||
}
|
||||
|
||||
/**
|
||||
* !!WorldGeneration!!
|
||||
*/
|
||||
|
@ -1345,7 +1345,7 @@ public class PlotMain extends JavaPlugin {
|
|||
if (Settings.DB.USE_MYSQL) {
|
||||
// TODO: Remake SQLManager
|
||||
if (DBFunc.dbManager == null) {
|
||||
DBFunc.dbManager = new SQLManager();
|
||||
DBFunc.dbManager = new SQLManager(connection, Settings.DB.PREFIX);
|
||||
}
|
||||
try {
|
||||
mySQL = new MySQL(this, Settings.DB.HOST_NAME, Settings.DB.PORT, Settings.DB.DATABASE, Settings.DB.USER, Settings.DB.PASSWORD);
|
||||
|
@ -1385,7 +1385,7 @@ public class PlotMain extends JavaPlugin {
|
|||
// DBFunc.dbManager = new MongoManager();
|
||||
sendConsoleSenderMessage(C.PREFIX.s() + "MongoDB is not yet implemented");
|
||||
} else if (Settings.DB.USE_SQLITE) {
|
||||
DBFunc.dbManager = new SQLManager();
|
||||
DBFunc.dbManager = new SQLManager(connection, Settings.DB.PREFIX);
|
||||
try {
|
||||
connection = new SQLite(this, Settings.DB.SQLITE_DB + ".db").openConnection();
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue