Class SubCommand

    • Field Summary

      Fields 
      Modifier and Type Field Description
      net.md_5.bungee.api.chat.TextComponent HELP  
      protected java.lang.String PREFIX  
    • Constructor Summary

      Constructors 
      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)  
    • Field Detail

      • HELP

        public final net.md_5.bungee.api.chat.TextComponent HELP
      • PREFIX

        protected final java.lang.String PREFIX
    • Constructor Detail

      • SubCommand

        protected SubCommand​(java.lang.String[] pCommands,
                             int pPriority,
                             net.md_5.bungee.api.chat.TextComponent pHelp,
                             java.lang.String pPrefix)
      • SubCommand

        protected SubCommand​(java.lang.String[] pCommands,
                             int pPriority,
                             java.lang.String pHelp,
                             java.lang.String pPrefix)
      • SubCommand

        protected SubCommand​(java.util.List<java.lang.String> pCommands,
                             int pPriority,
                             java.lang.String pHelp,
                             java.lang.String pPrefix,
                             java.lang.String pPermission)
        Parameters:
        pCommands - The names of this command
        pPriority - 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.
    • Method Detail

      • isApplicable

        public boolean isApplicable​(java.lang.String pCommand)
      • isApplicable

        public boolean isApplicable​(OnlinePAFPlayer pPlayer,
                                    java.lang.String pCommand)
      • sendError

        public void sendError​(OnlinePAFPlayer pPlayer,
                              net.md_5.bungee.api.chat.TextComponent pMessage)
      • sendError

        public void sendError​(OnlinePAFPlayer pPlayer,
                              java.lang.String pIdentifier)
      • onCommand

        public abstract void onCommand​(OnlinePAFPlayer pPlayer,
                                       java.lang.String[] args)
      • compareTo

        public int compareTo​(SubCommand o)
        Specified by:
        compareTo in interface java.lang.Comparable<SubCommand>
      • getCommandName

        public java.lang.String getCommandName()
      • getCommandNames

        public java.util.ArrayList<java.lang.String> getCommandNames()
      • printOutHelp

        public void printOutHelp​(OnlinePAFPlayer pPlayer,
                                 java.lang.String pCommandName)
      • hasPermission

        public boolean hasPermission​(OnlinePAFPlayer pPlayer)