public class ServerTable extends Table
plan_servers contains columns:
Modifier and Type | Field and Description |
---|---|
String |
statementSelectServerID |
String |
statementSelectServerNameID |
db, tableName, usingMySQL
Constructor and Description |
---|
ServerTable(SQLDB db,
boolean usingMySQL) |
Modifier and Type | Method and Description |
---|---|
void |
createTable() |
List<ServerInfo> |
getBukkitServers() |
Optional<ServerInfo> |
getBungeeInfo()
Used to get BungeeCord WebServer info if present.
|
String |
getColumnID() |
String |
getColumnUUID() |
int |
getMaxPlayers() |
Optional<Integer> |
getServerID(UUID serverUUID)
Returns server ID for a matching UUID
|
Optional<ServerInfo> |
getServerInfo(UUID serverUUID) |
Optional<String> |
getServerName(UUID serverUUID)
Returns server Name for a matching UUID
|
Map<Integer,String> |
getServerNames() |
Optional<UUID> |
getServerUUID(String serverName) |
List<UUID> |
getServerUUIDs() |
void |
insertAllServers(List<ServerInfo> allServerInfo) |
void |
saveCurrentServerInfo(ServerInfo info) |
addColumns, close, commit, createTable, equals, execute, executeUnsafe, getConnection, getDb, getTableName, getVersion, hashCode, removeAllData, removeColumns, toString
public final String statementSelectServerID
public final String statementSelectServerNameID
public ServerTable(SQLDB db, boolean usingMySQL)
public void createTable() throws DBCreateTableException
createTable
in class Table
DBCreateTableException
public void saveCurrentServerInfo(ServerInfo info) throws SQLException
SQLException
public Optional<Integer> getServerID(UUID serverUUID) throws SQLException
serverUUID
- UUID of the server.SQLException
- DB Errorpublic Optional<String> getServerName(UUID serverUUID) throws SQLException
serverUUID
- UUID of the server.SQLException
- DB Errorpublic Map<Integer,String> getServerNames() throws SQLException
SQLException
public Optional<ServerInfo> getBungeeInfo() throws SQLException
SQLException
- DB Errorpublic List<ServerInfo> getBukkitServers() throws SQLException
SQLException
public String getColumnID()
public String getColumnUUID()
public void insertAllServers(List<ServerInfo> allServerInfo) throws SQLException
SQLException
public List<UUID> getServerUUIDs() throws SQLException
SQLException
public Optional<UUID> getServerUUID(String serverName) throws SQLException
SQLException
public Optional<ServerInfo> getServerInfo(UUID serverUUID) throws SQLException
SQLException
public int getMaxPlayers() throws SQLException
SQLException
Copyright © 2017. All rights reserved.