crwdns150031:0crwdne150031:0
crwdns150033:0:javadoc:crwdne150033:0
crwdns150035:0crwdne150035:0
crwdns150037:0crwdne150037:0
crwdns150039:0crwdne150039:0
crwdns150041:0crwdne150041:0
import org.spongepowered.api.text.Text;
import org.spongepowered.api.command.spec.CommandSpec;
// /mail read
CommandSpec readCmd = CommandSpec.builder()
.permission("myplugin.mail.read")
.description(Text.of("Read your inbox"))
.executor(...)
.build();
// /mail send
CommandSpec sendCmd = CommandSpec.builder()
.permission("myplugin.mail.send")
.description(Text.of("Send a mail"))
.arguments(...)
.executor(...)
.build();
crwdns150043:0:javadoc:crwdne150043:0
import org.spongepowered.api.Sponge;
CommandSpec mailCommandSpec = CommandSpec.builder()
.permission("myplugin.mail")
.description(Text.of("Send and receive mails"))
.child(readCmd, "read", "r", "inbox")
.child(sendCmd, "send", "s", "write")
.build();
Sponge.getCommandManager().register(plugin, mailCommandSpec, "mail", "email");
Note
crwdns150045:0:javadoc:crwdne150045:0