mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
Fixed Server Copy failing
This commit is contained in:
parent
affef9f8ec
commit
163a694988
@ -185,7 +185,7 @@ public class CommandUseTable extends Table {
|
|||||||
statement = prepareStatement("SELECT " +
|
statement = prepareStatement("SELECT " +
|
||||||
columnCommand + ", " +
|
columnCommand + ", " +
|
||||||
columnTimesUsed + ", " +
|
columnTimesUsed + ", " +
|
||||||
serverUUIDColumn + ", " +
|
serverUUIDColumn +
|
||||||
" FROM " + tableName +
|
" FROM " + tableName +
|
||||||
" JOIN " + serverTable + " on " + serverIDColumn + "=" + columnServerID
|
" JOIN " + serverTable + " on " + serverIDColumn + "=" + columnServerID
|
||||||
);
|
);
|
||||||
|
@ -284,7 +284,7 @@ public class ServerTable extends Table {
|
|||||||
String name = info.getName();
|
String name = info.getName();
|
||||||
String webAddress = info.getWebAddress();
|
String webAddress = info.getWebAddress();
|
||||||
|
|
||||||
if (Verify.notNull(uuid, name, webAddress)) {
|
if (uuid == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,6 @@ public abstract class Table {
|
|||||||
if (statement == null) {
|
if (statement == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
endTransaction(statement.getConnection());
|
endTransaction(statement.getConnection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class BatchOperationTable extends Table {
|
|||||||
toDB.removeAllData();
|
toDB.removeAllData();
|
||||||
|
|
||||||
copyServers(toDB);
|
copyServers(toDB);
|
||||||
System.out.println(toDB.getDb().getServerTable().getServerNames().toString());
|
System.out.println(toDB.getDb().getServerTable().getBukkitServers().toString());
|
||||||
copyUsers(toDB);
|
copyUsers(toDB);
|
||||||
System.out.println(toDB.getDb().getSavedUUIDs().toString());
|
System.out.println(toDB.getDb().getSavedUUIDs().toString());
|
||||||
copyWorlds(toDB);
|
copyWorlds(toDB);
|
||||||
@ -133,6 +133,7 @@ public class BatchOperationTable extends Table {
|
|||||||
Log.debug("Batch Copy Servers");
|
Log.debug("Batch Copy Servers");
|
||||||
ServerTable serverTable = db.getServerTable();
|
ServerTable serverTable = db.getServerTable();
|
||||||
List<ServerInfo> servers = serverTable.getBukkitServers();
|
List<ServerInfo> servers = serverTable.getBukkitServers();
|
||||||
|
System.out.println(servers.toString());
|
||||||
serverTable.getBungeeInfo().ifPresent(servers::add);
|
serverTable.getBungeeInfo().ifPresent(servers::add);
|
||||||
toDB.getDb().getServerTable().insertAllServers(servers);
|
toDB.getDb().getServerTable().insertAllServers(servers);
|
||||||
}
|
}
|
||||||
|
@ -74,4 +74,15 @@ public class ServerInfo {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(uuid, id, name, webAddress);
|
return Objects.hash(uuid, id, name, webAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ServerInfo{" +
|
||||||
|
"uuid=" + uuid +
|
||||||
|
", id=" + id +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", webAddress='" + webAddress + '\'' +
|
||||||
|
", maxPlayers=" + maxPlayers +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user