Class SubCommand
java.lang.Object
de.simonsator.partyandfriends.utilities.SubCommand
- All Implemented Interfaces:
Comparable<SubCommand>
- Direct Known Subclasses:
AdminSubCommand
,FriendSubCommand
,PartySubCommand
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
SubCommand
(String[] pCommands, int pPriority, String pHelp, String pPrefix) protected
SubCommand
(String[] pCommands, int pPriority, net.md_5.bungee.api.chat.TextComponent pHelp, String pPrefix) protected
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
hasPermission
(OnlinePAFPlayer pPlayer) boolean
isApplicable
(OnlinePAFPlayer pPlayer, String pCommand) boolean
isApplicable
(String pCommand) abstract void
onCommand
(OnlinePAFPlayer pPlayer, String[] args) void
printOutHelp
(OnlinePAFPlayer pPlayer, String pCommandName) void
sendError
(OnlinePAFPlayer pPlayer, String pIdentifier) void
sendError
(OnlinePAFPlayer pPlayer, net.md_5.bungee.api.chat.TextComponent pMessage)
-
Field Details
-
HELP
public final net.md_5.bungee.api.chat.TextComponent HELP -
PREFIX
-
-
Constructor Details
-
SubCommand
-
SubCommand
-
SubCommand
protected SubCommand(List<String> pCommands, int pPriority, String pHelp, String pPrefix, String pPermission) - Parameters:
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 whenprintOutHelp(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.
-
-
Method Details
-
isApplicable
-
isApplicable
-
sendError
-
sendError
-
onCommand
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SubCommand>
-
getCommandName
-
getCommandNames
-
printOutHelp
-
hasPermission
-