Closed NattoCB closed 9 months ago
运行环境
Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2 构建版本(从/version指令获取): https://github.com/Luohuayu/CatServer/commit/6c3f59653b3cc3e1528206f1b5998ebeee62f3ba 相关模组/插件: 任意新模组
描述这个BUG 模组命令失效
导致的问题 模组命令失效
复现方法
写一个模组如下:
private static final Logger LOGGER = LoggerFactory.getLogger(TestMod.class); @SubscribeEvent public void onServerStarting(ServerStartingEvent event) { event.getServer().getCommands().getDispatcher().register(Commands.literal("testmod") .then(Commands.literal("test") .executes(TestMod::testLogic))); } private static int testLogic(CommandContext<CommandSourceStack> context) { context.getSource().sendSuccess(new TextComponent("test"), false); LOGGER.info("test"); return Command.SINGLE_SUCCESS; }
用 /testmod test 调用 testLogic 的 LOGGER 输出日志 test ,并给玩家发送信息 “test”
/testmod test
实测结果:
经过测试后Create命令正常,若还有问题提供测试mod(我不晓得为什么拉不下来forgemdk)并再开启一个issue
运行环境
Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2 构建版本(从/version指令获取): https://github.com/Luohuayu/CatServer/commit/6c3f59653b3cc3e1528206f1b5998ebeee62f3ba 相关模组/插件: 任意新模组
描述这个BUG 模组命令失效
导致的问题 模组命令失效
复现方法
写一个模组如下:
用
/testmod test
调用 testLogic 的 LOGGER 输出日志 test ,并给玩家发送信息 “test”实测结果: