Posted August 9, 20205 yr I add a custom command. Its feedback is translated correctly on chat. However, console shows only translationKey. How do I fix? @SubscribeEvent public static void onCommandsRegister(RegisterCommandsEvent event) { SetDistanceCommand.register(event.getDispatcher()); } public class SetDistanceCommand { public static void register(CommandDispatcher<CommandSource> dispatcher) { dispatcher.register(Commands.literal("setdistance") .requires(source -> source.hasPermissionLevel(2)) .then(Commands.argument("blocks", IntegerArgumentType.integer(10, 100000)) .executes(context -> { int value = IntegerArgumentType.getInteger(context, "blocks"); TestModConfig.distanceToNormal = value; context.getSource().sendFeedback(new TranslationTextComponent("commands.testmod.setdistance", value), true); return 0; }))); } } Quote [11:24:19] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer/]: [Dev: commands.testmod.setdistance] Edited August 9, 20205 yr by kyazuki
August 9, 20205 yr Author I can't translate on console? Vanilla commands are translated on console, so I assumed I can.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.