第58批修复:
Check Source / check (push) Successful in 4s
Auto Release / build (push) Successful in 3m14s
Simple Test / test (push) Successful in 1s
Test Env / test (push) Successful in 1s

- 领地误删致命bug:AreaProtection 改用 userExistsIgnoreCase(SQL异常返回true,不误删)
- getConnection 自动重连:连接已关闭时重建,解决 SN/信誉同步 database connection closed
- userExists/userExistsIgnoreCase/userExistsStrict 改用 getConnection() 自动重连
- AI配置解析跳过诊断日志:findProviderUrl 返回 null 时输出具体供应商名和路径,便于排查 0个模型 问题
This commit is contained in:
youpaishidifu
2026-10-28 19:19:38 +08:00
parent 6a5af09ed3
commit 67f8d6e7fb
3 changed files with 3183 additions and 3155 deletions
+9 -1
View File
@@ -274,7 +274,10 @@ public class AIChatManager {
boolean isCustom = supplierConfig.has("baseurl");
boolean isBuiltin = supplierConfig.has("供应商名字");
if (!isCustom && !isBuiltin) continue;
if (!isCustom && !isBuiltin) {
plugin.getLogger().info("[AI聊天] 配置跳过[" + key + "]: 既无baseurl也无供应商名字");
continue;
}
String baseUrl;
String apiKey = getStr(supplierConfig, "apikey");
@@ -286,9 +289,14 @@ public class AIChatManager {
} else {
String providerName = getStr(supplierConfig, "供应商名字");
baseUrl = findProviderUrl(providerName);
if (baseUrl == null || baseUrl.isEmpty()) {
plugin.getLogger().warning("[AI聊天] 配置跳过[" + key + "]: 内置供应商 '" + providerName + "' 在 供应商.json 中找不到URL");
plugin.getLogger().warning("[AI聊天] 诊断: 请确认 供应商.json 中存在路径 '" + providerName + "',且路径拼写完全正确");
}
}
if (baseUrl == null || baseUrl.isEmpty() || apiKey == null || apiKey.isEmpty()) {
plugin.getLogger().warning("[AI聊天] 配置跳过[" + key + "]: baseUrl=" + baseUrl + ", apiKey=" + apiKey);
continue;
}
+4 -1
View File
@@ -10911,8 +10911,11 @@ public class AreaProtection implements Listener {
String reason = (String) o[1];
if (reason == null) {
if (dbMgr == null) continue;
// ★ 第58批修复:SQL 异常时 userExists 返回 false,
// 会把 DB 抖动误判为"账户已注销"从而删领地。
// 改用 userExistsIgnoreCase(异常返回 true,宁可放过)。
try {
if (!dbMgr.userExists(ac.owner)) {
if (!dbMgr.userExistsIgnoreCase(ac.owner)) {
reason = "账户已注销";
}
} catch (Exception ignored) {}
File diff suppressed because it is too large Load Diff