#Custom Command
8 messages · Page 1 of 1 (latest)
Send the code file it self, i cant help but
Itll help others
Here's what it tells in minecraft (litteraly in english "unknown command or incomplete, see the error bellow")
const { commands: Commands, arguments: Arguments } = event
event.register(Commands.literal('set_starbattleon') // The name of the command
.requires(s => s.hasPermission(2)) // Check if the player has operator privileges
.then(Commands.argument('target', Arguments.PLAYER.create(event)))
.executes(c => set_starbattle(Arguments.PLAYER.getResult(c, 'target')))
)
let set_starbattle = (player) => {
console.log("Player Logged");
return 1;
}
})```
It also seems that it recognize the player argument