Fix bugs with backpack loading

This commit is contained in:
GeorgH93 2021-05-23 22:23:40 +02:00
parent 41a74ee758
commit 3231d15886
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -70,7 +70,7 @@ public SQL(@NotNull Minepacks plugin, @NotNull ConnectionProvider connectionProv
// Delete old backpacks
try(Connection connection = getConnection())
{
DBTools.runStatementWithoutException(connection, queryDeleteOldBackpacks);
if(maxAge > 0) DBTools.runStatementWithoutException(connection, queryDeleteOldBackpacks);
if(syncCooldown) DBTools.runStatementWithoutException(connection, queryDeleteOldCooldowns, System.currentTimeMillis());
}
}
@ -96,7 +96,7 @@ else if(fieldName.startsWith("field"))
{
fieldName = fieldName.substring("Player".length());
}
else if(fieldName.startsWith("BP") || fieldName.startsWith("Cd"))
else if(fieldName.startsWith("Bp") || fieldName.startsWith("Cd"))
fieldName = fieldName.substring(2);
return plugin.getConfiguration().getDBFields(metadata + "." + fieldName, currentValue);
}