java.lang.Comparable<SubCommand>
FriendSubCommand
, PartySubCommand
public abstract class SubCommand extends java.lang.Object implements java.lang.Comparable<SubCommand>
Modifier and Type | Field | Description |
---|---|---|
net.md_5.bungee.api.chat.TextComponent |
HELP |
|
protected java.lang.String |
PREFIX |
Modifier | Constructor | Description |
---|---|---|
protected |
SubCommand(java.lang.String[] pCommands,
int pPriority,
java.lang.String pHelp,
java.lang.String pPrefix) |
|
protected |
SubCommand(java.lang.String[] pCommands,
int pPriority,
net.md_5.bungee.api.chat.TextComponent pHelp,
java.lang.String pPrefix) |
|
protected |
SubCommand(java.util.List<java.lang.String> pCommands,
int pPriority,
java.lang.String pHelp,
java.lang.String pPrefix,
java.lang.String pPermission) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(SubCommand o) |
|
java.lang.String |
getCommandName() |
|
java.util.ArrayList<java.lang.String> |
getCommandNames() |
|
boolean |
hasPermission(OnlinePAFPlayer pPlayer) |
|
boolean |
isApplicable(OnlinePAFPlayer pPlayer,
java.lang.String pCommand) |
|
boolean |
isApplicable(java.lang.String pCommand) |
|
abstract void |
onCommand(OnlinePAFPlayer pPlayer,
java.lang.String[] args) |
|
void |
printOutHelp(OnlinePAFPlayer pPlayer,
java.lang.String pCommandName) |
|
void |
sendError(OnlinePAFPlayer pPlayer,
java.lang.String pIdentifier) |
|
protected void |
sendError(OnlinePAFPlayer pPlayer,
net.md_5.bungee.api.chat.TextComponent pMessage) |
public final net.md_5.bungee.api.chat.TextComponent HELP
protected final java.lang.String PREFIX
protected SubCommand(java.lang.String[] pCommands, int pPriority, net.md_5.bungee.api.chat.TextComponent pHelp, java.lang.String pPrefix)
protected SubCommand(java.lang.String[] pCommands, int pPriority, java.lang.String pHelp, java.lang.String pPrefix)
protected SubCommand(java.util.List<java.lang.String> pCommands, int pPriority, java.lang.String pHelp, java.lang.String pPrefix, java.lang.String pPermission)
pCommands
- The names of this commandpPriority
- The priority of this command (the command with the lowest priority is listed first)pHelp
- The help message. It will be outprinted when the command is listed and when printOutHelp(OnlinePAFPlayer, String)
printOutHelp} is called.pPrefix
- The prefix of this command (e.g. [Friends] or [Party])pPermission
- The permission which is needed to execute this command. If no Permission is needed set it to null.public boolean isApplicable(java.lang.String pCommand)
public boolean isApplicable(OnlinePAFPlayer pPlayer, java.lang.String pCommand)
protected void sendError(OnlinePAFPlayer pPlayer, net.md_5.bungee.api.chat.TextComponent pMessage)
public void sendError(OnlinePAFPlayer pPlayer, java.lang.String pIdentifier)
public abstract void onCommand(OnlinePAFPlayer pPlayer, java.lang.String[] args)
public int compareTo(SubCommand o)
compareTo
in interface java.lang.Comparable<SubCommand>
public java.lang.String getCommandName()
public java.util.ArrayList<java.lang.String> getCommandNames()
public void printOutHelp(OnlinePAFPlayer pPlayer, java.lang.String pCommandName)
public boolean hasPermission(OnlinePAFPlayer pPlayer)