mirror of
https://github.com/GeyserMC/GeyserConnect.git
synced 2025-06-26 06:15:21 +02:00
Remove test database code
This commit is contained in:
parent
71fbe173b0
commit
ae9b369f21
3 changed files with 2 additions and 14 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -33,5 +33,5 @@ jobs:
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: GeyserConnect
|
||||||
path: build/libs/GeyserConnect.jar
|
path: build/libs/GeyserConnect.jar
|
||||||
|
|
2
.github/workflows/pullrequest.yml
vendored
2
.github/workflows/pullrequest.yml
vendored
|
@ -33,5 +33,5 @@ jobs:
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: GeyserConnect
|
||||||
path: build/libs/GeyserConnect.jar
|
path: build/libs/GeyserConnect.jar
|
||||||
|
|
|
@ -52,18 +52,6 @@ public abstract class AbstractSQLStorageManager extends AbstractStorageManager {
|
||||||
try (Statement createPlayersTable = connection.createStatement()) {
|
try (Statement createPlayersTable = connection.createStatement()) {
|
||||||
createPlayersTable.executeUpdate("CREATE TABLE IF NOT EXISTS players (xuid VARCHAR(32), servers TEXT, PRIMARY KEY(xuid));");
|
createPlayersTable.executeUpdate("CREATE TABLE IF NOT EXISTS players (xuid VARCHAR(32), servers TEXT, PRIMARY KEY(xuid));");
|
||||||
}
|
}
|
||||||
|
|
||||||
try (PreparedStatement getPlayersServers = connection.prepareStatement("SELECT xuid, servers FROM players")) {
|
|
||||||
ResultSet rs = getPlayersServers.executeQuery();
|
|
||||||
|
|
||||||
while (rs.next()) {
|
|
||||||
List<Server> loadedServers = Utils.OBJECT_MAPPER.readValue(rs.getString("servers"), new TypeReference<>() {
|
|
||||||
});
|
|
||||||
GeyserConnect.instance().logger().info("Loaded " + loadedServers.size() + " servers for " + rs.getString("xuid"));
|
|
||||||
}
|
|
||||||
} catch (IOException | SQLException exception) {
|
|
||||||
GeyserConnect.instance().logger().error("Couldn't load servers", exception);
|
|
||||||
}
|
|
||||||
} catch (ClassNotFoundException | SQLException e) {
|
} catch (ClassNotFoundException | SQLException e) {
|
||||||
GeyserConnect.instance().logger().severe("Unable to connect to MySQL database!", e);
|
GeyserConnect.instance().logger().severe("Unable to connect to MySQL database!", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue