Archived
0

Added autoReconnect to LoginSecurity

This commit is contained in:
David Panić
2019-04-29 00:15:33 +02:00
parent e738ad0fc6
commit 6e2bf1b5fa

View File

@@ -37,7 +37,7 @@ import com.redstoner.modules.Module;
@Commands(CommandHolderType.File) @Commands(CommandHolderType.File)
@AutoRegisterListener @AutoRegisterListener
@Version(major = 5, minor = 1, revision = 0, compatible = 5) @Version(major = 5, minor = 1, revision = 1, compatible = 5)
public class LoginSecurity implements Module, Listener public class LoginSecurity implements Module, Listener
{ {
protected static Map<UUID, Location> loggingIn; protected static Map<UUID, Location> loggingIn;
@@ -55,7 +55,7 @@ public class LoginSecurity implements Module, Listener
} }
try try
{ {
MysqlDatabase database = MysqlHandler.INSTANCE.getDatabase((String) config.get("database")); MysqlDatabase database = MysqlHandler.INSTANCE.getDatabase((String) config.get("database") + "?autoReconnect=true");
MysqlField uuid = new MysqlField("uuid", new VarChar(36), true); MysqlField uuid = new MysqlField("uuid", new VarChar(36), true);
MysqlField pass = new MysqlField("pass", new VarChar(88), true); MysqlField pass = new MysqlField("pass", new VarChar(88), true);
database.createTableIfNotExists((String) config.get("table"), uuid, pass); database.createTableIfNotExists((String) config.get("table"), uuid, pass);