feat: 新增/botlist假人名单管理,/botall按名单过滤
名单持久化到config/slsa-bot-list.json。名单非空时/botall只操作名单内假人,为空时操作所有。支持add/remove/clear/show/addall。
This commit is contained in:
1 parent
541ffe5ed2
commit
ccbf442413
4 files changed
+209
-3
No files matched your search
@@ -4,6 +4,7 @@ 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.BotListCommand;
|
||||
import com.github.zly2006.carpetslsaddition.command.HatCommand;
|
||||
import com.github.zly2006.carpetslsaddition.command.SitCommand;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -83,9 +84,10 @@ public class ServerMain implements ModInitializer, CarpetExtension {
|
||||
SitCommand.register(dispatcher);
|
||||
BotCommand.register(dispatcher);
|
||||
BotAllCommand.register(dispatcher);
|
||||
BotListCommand.register(dispatcher);
|
||||
LOGGER.info("[SLSA] commands registered: hat/sit/bot");
|
||||
} catch (Throwable t) {
|
||||
LOGGER.error("[SLSA] failed to register commands", t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user