You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 9, 2021. It is now read-only.
Dkrieger edited this page Jan 6, 2019
·
1 revision
You can create platform independent commands with using the DKBans NetworkCommand, See here an example command.
The NetworkCommand works like a normal bukkit or BungeeCord command.
Create a command
public class MyCommand extends NetworkCommand {
public MyCommand() {
super("mycoolcommand","My Cool command","mycommand.permission","Use /myCoolCommand","mcc");
setPrefix("&8[&cmyCommand&8] ");//Set a prefix
}
@Override
public void onExecute(NetworkCommandSender sender, String[] args) {
sender.sendMessage(getPrefix()+"Hey"); //Make some stuff.
}
@Override
public List<String> onTabComplete(NetworkCommandSender sender, String[] args) {
return new ArryList<>(); //Return a lsit with your tab options.
}
}