debug: onClientRequest打印obj是否null

This commit is contained in:
AxTps committed 2026-10-06 21:34:58 +08:00
1 parent a434f12749
commit 35b05eb044
1 file changed
+2
@@ -106,6 +106,8 @@ public final class BoardManager {
Objective obj = objectiveName == null || objectiveName.isEmpty() Objective obj = objectiveName == null || objectiveName.isEmpty()
? null ? null
: server.getScoreboard().getObjective(objectiveName); : server.getScoreboard().getObjective(objectiveName);
ServerMain.LOGGER.info("[SLSA-BOARD] onClientRequest player={} name={} obj={}",
player.getScoreboardName(), objectiveName, obj);
// 直接给该玩家发 display 包(slot=SIDEBAR,objective 可为 null 表示清除) // 直接给该玩家发 display 包(slot=SIDEBAR,objective 可为 null 表示清除)
player.connection.send(new net.minecraft.network.protocol.game.ClientboundSetDisplayObjectivePacket( player.connection.send(new net.minecraft.network.protocol.game.ClientboundSetDisplayObjectivePacket(
net.minecraft.world.scores.DisplaySlot.SIDEBAR, obj)); net.minecraft.world.scores.DisplaySlot.SIDEBAR, obj));