Skip to content

数据库里那个lock有时崩服后仍然为1 导致玩家下次进不去服务器 #1

@Maaaazy

Description

@Maaaazy

if ((tUser == null || tUser.isLocked()) && this.mRetry <= RETRY_COUNT) {
Log.debug("Load user data " + this.mName + " fail " + mRetry + (tUser == null ? "(no data and wait)" : "(Locked)"));
} else {
if (tUser != null && tUser.isLocked()) {
if (!this.mPlugin.getConfigManager().mForceUseLockData) {
if (this.tryKickIfError()) {
Log.info("用户数据锁定,踢出玩家");
return;
}
}
Log.warn("Use locked data to restore user " + this.mName);
}
this.restoreUser(tUser, false);
Bukkit.getScheduler().callSyncMethod(this.mPlugin, Executors.callable(() -> Bukkit.getPluginManager().callEvent(new PlayerDataLoadCompleteEvent(this.mPlayer.getPlayer()))));
break;
}
这里要是lock为1 就不会走restore 崩服或者直接x掉服务器时 数据库中 lock会变成1 然后就进不去服了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions