can someone help me? it doesn't even show the console warn message. no errors appearing too.
- using 2.1.0 api
- everything is well imported, the file works i even tried to console warn outside of the scope and its fine, its just this thing doesnt work
system.beforeEvents.startup.subscribe(({ customCommandRegistry }) => {
console.warn("test")
customCommandRegistry.registerEnum("ap:sellOptions", ["all", "menu"]);
customCommandRegistry.registerCommand(
{
name: "ap:sell",
description: "Sell items or open the sell menu.",
permissionLevel: CommandPermissionLevel.Any,
cheatsRequired: false,
mandatoryParameters: [
{
name: "ap:sellOptions",
type: CustomCommandParamType.Enum,
},
],
},
(origin, option) => {
const player = origin.player;
if (!player) {
return { status: CustomCommandStatus.Failure };
}
if (option === "all") {
system.run(()=>{
sellAll(player);
})
} else if (option === "menu") {
system.run(()=>{
openSellMenu(player);
})
}
return {
status: CustomCommandStatus.Success,
};
}
);
});