mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2026-01-04 15:41:35 +00:00
Reduced lock release time
This commit is contained in:
@@ -75,7 +75,6 @@ tasks {
|
||||
relocate ("com.github.benmanes.caffeine", "net.momirealms.customfishing.libraries.caffeine")
|
||||
relocate ("net.momirealms.sparrow.heart", "net.momirealms.customfishing.bukkit.nms")
|
||||
relocate ("com.saicone.rtag", "net.momirealms.customfishing.libraries.rtag")
|
||||
relocate ("xyz.xenondevs", "net.momirealms.customfishing.libraries")
|
||||
relocate ("net.objecthunter.exp4j", "net.momirealms.customfishing.libraries.exp4j")
|
||||
relocate ("net.jpountz", "net.momirealms.customfishing.libraries.jpountz") //lz4
|
||||
relocate ("redis.clients.jedis", "net.momirealms.customfishing.libraries.jedis")
|
||||
|
||||
@@ -134,7 +134,7 @@ public abstract class AbstractSQLDatabase extends AbstractStorage {
|
||||
data.uuid(uuid);
|
||||
if (lock) {
|
||||
int lockValue = rs.getInt(2);
|
||||
if (lockValue != 0 && getCurrentSeconds() - ConfigManager.dataSaveInterval() <= lockValue) {
|
||||
if (lockValue != 0 && getCurrentSeconds() - 30 <= lockValue) {
|
||||
connection.close();
|
||||
data.locked(true);
|
||||
future.complete(Optional.of(data));
|
||||
|
||||
@@ -129,7 +129,7 @@ public class SQLiteProvider extends AbstractSQLDatabase {
|
||||
PlayerData data = plugin.getStorageManager().fromBytes(dataByteArray);
|
||||
data.uuid(uuid);
|
||||
int lockValue = rs.getInt(2);
|
||||
if (lockValue != 0 && getCurrentSeconds() - ConfigManager.dataSaveInterval() <= lockValue) {
|
||||
if (lockValue != 0 && getCurrentSeconds() - 30 <= lockValue) {
|
||||
connection.close();
|
||||
data.locked(true);
|
||||
future.complete(Optional.of(data));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Don"t change this
|
||||
# Don't change this
|
||||
config-version: "33"
|
||||
|
||||
exception.invalid_syntax: "<red>Invalid syntax. Correct syntax: <white><arg:0></white></red>"
|
||||
|
||||
Reference in New Issue
Block a user