How I can create a Command in a other class

GalaxyGamer

Member
Hey,

I would like to create a Command in a new Class (not in the Main Class). But yet i dont know must the Command class execute any other class from the nukkitx api? I hope anywon help ;D
 

CreeperFace

🇨🇿🇺🇦 Слава Україні!
Staff member
no, your class has to extend Command class. Then you can easily register a new command with server.getCommandMap().register()
 
Top