第120批:PVP自定义模式CLI是/否按钮改用ASCII on/off(修复中文参数点击失效)+诊断日志
Auto Release / build (push) Successful in 2m29s
Auto Release / build (push) Successful in 2m29s
This commit is contained in:
@@ -0,0 +1 @@
|
||||
第116批:AI聊天HTTP请求改用独立线程池,不再共用commonPool
|
||||
@@ -0,0 +1,15 @@
|
||||
第118批:违禁品没收/归还全链路PDC批次打标+日志抓现行
|
||||
|
||||
玩家实测「每出进一次领地多给1个违禁品,不需要退出重进」,
|
||||
115批的onQuit清暂存防不住在线出进循环。按用户思路上日志抓现行:
|
||||
|
||||
1. 没收时给每件物品盖PDC批次章(nanoTime),日志打:
|
||||
玩家/领地/入口(栈顶5帧)/物品明细/数量/批次号/returnOnLeave
|
||||
2. 退还前扫背包+副手:同批次带标物品仍在玩家手上=插件已提前
|
||||
返还过→本批暂存丢弃不再还(防重复退还+1)
|
||||
3. 退还日志:退给谁/领地/批次/数量/明细/拦截多少
|
||||
4. 清暂存日志:退出时清多少件
|
||||
5. 空没收日志:进了没收却没收到(排查入口异常)
|
||||
|
||||
Paper 26.2 API变更:ItemStack.getPersistentDataContainer()返回
|
||||
只读View,set走editPersistentDataContainer(Consumer)。
|
||||
@@ -0,0 +1,5 @@
|
||||
第119批:快问快答题库加载日志改为有变化才打印
|
||||
|
||||
生产日志每5分钟被「快问快答题目已加载 315 条、答案 214 条」刷屏
|
||||
(内容完全不变)。加 lastQuizLoadSignature 签名(题数/答案数/来源路径):
|
||||
首次加载打「已加载」,签名变化打「已更新」,签名一致静默闭嘴。
|
||||
@@ -125,13 +125,17 @@ public class PVPCustomModeManager {
|
||||
.hoverEvent(HoverEvent.showText(Component.text("§e点击-1"))));
|
||||
} else {
|
||||
// 是/否项:按钮点击即执行 /pvp custom set <项> <值>,直接切换(不拉起聊天栏)
|
||||
// ★ 第120批:点击执行参数一律用 ASCII on/off(不用中文「是/否」)。
|
||||
// 中文参数经 ClickEvent.runCommand 在客户端→服务器往返时不可靠,
|
||||
// 玩家点「是」实际到达服务器的是「否」→ parseBool 判否 → 渲染回「否」。
|
||||
// 改 ASCII 后彻底绕开非 ASCII 传输;parseBool 本就接受 on/off。
|
||||
line = line.append(Component.text("§a[是] ")
|
||||
.clickEvent(ClickEvent.runCommand(
|
||||
"/pvp custom set " + OPTION_KEYS[step] + " 是"))
|
||||
"/pvp custom set " + OPTION_KEYS[step] + " on"))
|
||||
.hoverEvent(HoverEvent.showText(Component.text("§e点击切换为「是」")))
|
||||
.append(Component.text("§c[否] "))
|
||||
.clickEvent(ClickEvent.runCommand(
|
||||
"/pvp custom set " + OPTION_KEYS[step] + " 否"))
|
||||
"/pvp custom set " + OPTION_KEYS[step] + " off"))
|
||||
.hoverEvent(HoverEvent.showText(Component.text("§e点击切换为「否」"))));
|
||||
}
|
||||
p.sendMessage(line);
|
||||
@@ -160,6 +164,16 @@ public class PVPCustomModeManager {
|
||||
}
|
||||
int idx = keyIndex(key);
|
||||
if (idx < 0) return false;
|
||||
// ★ 第120批诊断日志:把到达的原始参数 hex 出来,若再点「是」却收到「否」,
|
||||
// 一眼看出是编码问题还是命令本身问题(on/off ASCII 不应有编码歧义)。
|
||||
if (plugin != null && plugin.getLogger() != null) {
|
||||
StringBuilder hex = new StringBuilder();
|
||||
for (byte b : val.getBytes(java.nio.charset.StandardCharsets.UTF_8)) {
|
||||
hex.append(String.format("%02x ", b));
|
||||
}
|
||||
plugin.getLogger().info("[PVP自定义] setOption 收到 key=" + key
|
||||
+ " val='" + val + "' (UTF8: " + hex.toString().trim() + ") -> " + OPTION_NAMES[idx]);
|
||||
}
|
||||
switch (idx) {
|
||||
case 0: cfg.forceEquip = parseBool(val); break;
|
||||
case 1: cfg.itemsOn = parseBool(val); break;
|
||||
|
||||
Reference in New Issue
Block a user