mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +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 " +
|
||||
columnCommand + ", " +
|
||||
columnTimesUsed + ", " +
|
||||
serverUUIDColumn + ", " +
|
||||
serverUUIDColumn +
|
||||
" FROM " + tableName +
|
||||
" JOIN " + serverTable + " on " + serverIDColumn + "=" + columnServerID
|
||||
);
|
||||
|
@ -284,7 +284,7 @@ public class ServerTable extends Table {
|
||||
String name = info.getName();
|
||||
String webAddress = info.getWebAddress();
|
||||
|
||||
if (Verify.notNull(uuid, name, webAddress)) {
|
||||
if (uuid == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,6 @@ public abstract class Table {
|
||||
if (statement == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
endTransaction(statement.getConnection());
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class BatchOperationTable extends Table {
|
||||
toDB.removeAllData();
|
||||
|
||||
copyServers(toDB);
|
||||
System.out.println(toDB.getDb().getServerTable().getServerNames().toString());
|
||||
System.out.println(toDB.getDb().getServerTable().getBukkitServers().toString());
|
||||
copyUsers(toDB);
|
||||
System.out.println(toDB.getDb().getSavedUUIDs().toString());
|
||||
copyWorlds(toDB);
|
||||
@ -133,6 +133,7 @@ public class BatchOperationTable extends Table {
|
||||
Log.debug("Batch Copy Servers");
|
||||
ServerTable serverTable = db.getServerTable();
|
||||
List<ServerInfo> servers = serverTable.getBukkitServers();
|
||||
System.out.println(servers.toString());
|
||||
serverTable.getBungeeInfo().ifPresent(servers::add);
|
||||
toDB.getDb().getServerTable().insertAllServers(servers);
|
||||
}
|
||||
|
@ -74,4 +74,15 @@ public class ServerInfo {
|
||||
public int hashCode() {
|
||||
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