I made an addon with a custom command and noticed it wasn’t working in realms I thought it was odd but maybe sense I added the command as a new feature then maybe the realm already cached the old one so I did many things by incrementing the version number, changing the uuid, I re applied the pack. Well finally I decided I’m gonna test it by making a basic example that has barely anything except a custom command I did that and the command still will not function on realms it works in a single player world but not on realms. Both addons don’t require any experimental features.
Comments 3
here is my main.ts the @minecraft/server version is the latest “2.1.0”
import { system, CustomCommandStatus, CommandPermissionLevel, world, Player } from "@minecraft/server";
system.beforeEvents.startup.subscribe(ev => {
try {
ev.customCommandRegistry.registerCommand(
{
name: "test:test_command",
description: "A simple test command",
permissionLevel: CommandPermissionLevel.Any,
cheatsRequired: false,
mandatoryParameters: []
}, (_origin) => {
const player = _origin.sourceEntity;
if (!(player instanceof Player)) {
return { success: CustomCommandStatus.Failure, status: 0 };
}
player.sendMessage("Hello World");
return { success: CustomCommandStatus.Success, status: 0 };
}
);
} catch (err) {
world.sendMessage("Failed to register test command: " + err);
}
});
So I figured it out, its not the custom commands those work it is just realms basically if you have an addon edit it then have it on realms it wont work. You have to change the uuid then delete it from your cache and then install the new one and re apply that to realms. On singleplayer worlds they update if you change the behavior pack or resource pack its only realms that dont.
Please attach the add-on to this report.