feat: 新增/botall批量控制假人命令(sit/stand)

遍历所有isBot()为true的EntityPlayerMPFake,批量坐下/站起。重构SitCommand抽出sitPlayer公共方法。
This commit is contained in:
AxTps committed 2026-10-05 10:39:42 +08:00
1 parent d6eb433f65
commit ea93b9dcdf
3 files changed
+105 -13

No files matched your search

@@ -2,6 +2,7 @@ package com.github.zly2006.carpetslsaddition;
import carpet.CarpetExtension;
import carpet.CarpetServer;
import com.github.zly2006.carpetslsaddition.command.BotAllCommand;
import com.github.zly2006.carpetslsaddition.command.BotCommand;
import com.github.zly2006.carpetslsaddition.command.HatCommand;
import com.github.zly2006.carpetslsaddition.command.SitCommand;
@@ -81,6 +82,7 @@ public class ServerMain implements ModInitializer, CarpetExtension {
HatCommand.register(dispatcher);
SitCommand.register(dispatcher);
BotCommand.register(dispatcher);
BotAllCommand.register(dispatcher);
LOGGER.info("[SLSA] commands registered: hat/sit/bot");
} catch (Throwable t) {
LOGGER.error("[SLSA] failed to register commands", t);