crwdns120107:0crwdne120107:0

crwdns120109:0:javadoc:crwdne120109:0

  • crwdns120111:0crwdne120111:0

    • crwdns120113:0crwdne120113:0

    • crwdns120115:0crwdne120115:0

crwdns120117:0crwdne120117: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();

crwdns120119:0:javadoc:crwdne120119:0

import org.spongepowered.api.Sponge;

PluginContainer plugin = ...;

CommandSpec mailCommandSpec = CommandSpec.builder()
    .permission("myplugin.mail.base")
    .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");

crwdns120121:0crwdne120121:0

crwdns120123:0:javadoc:crwdnd120123:0:javadoc:crwdnd120123:0:javadoc:crwdne120123:0

crwdns120125:0:javadoc:crwdne120125:0

crwdns120127:0:javadoc:crwdne120127:0

  • crwdns120129:0:javadoc:crwdne120129:0

  • crwdns120131:0:javadoc:crwdne120131:0

crwdns120133:0crwdne120133:0