mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
Reduced lock release time
This commit is contained in:
@@ -19,6 +19,7 @@ package net.momirealms.customfishing.bukkit.integration.level;
|
||||
|
||||
import dev.aurelium.auraskills.api.AuraSkillsApi;
|
||||
import dev.aurelium.auraskills.api.registry.NamespacedId;
|
||||
import net.momirealms.customfishing.api.event.FishingLootSpawnEvent;
|
||||
import net.momirealms.customfishing.api.integration.LevelerProvider;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -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