Class MSG

  • All Implemented Interfaces:
    net.md_5.bungee.api.plugin.Listener

    public class MSG
    extends OnlyTopCommand
    Will be executed on /msg
    • Constructor Detail

      • MSG

        public MSG​(java.lang.String[] friendsAliasMsg,
                   java.lang.String pPrefix)
        Initials the command
        Parameters:
        friendsAliasMsg - The aliases for the command /msg
    • Method Detail

      • getInstance

        public static MSG getInstance()
      • onCommand

        protected void onCommand​(OnlinePAFPlayer pPlayer,
                                 java.lang.String[] args)
        Description copied from class: TopCommand
        Decides if a subcommand should be called and if which one. If no subcommand should be called it shows the help of the commands.
        Specified by:
        onCommand in class TopCommand
        Parameters:
        pPlayer - The player who executed the command.
        args - The arguments which were given by the player.
      • send

        public void send​(OnlinePAFPlayer pPlayer,
                         java.lang.String[] args,
                         int type)
        Send a message from a sender to a receiver
        Parameters:
        pPlayer - Sender
        args - Arguments
        type - The type of the used command either 0 if the player used the command /friend msg or 1 if the player used the command /msg
      • deliverOfflineMessage

        public void deliverOfflineMessage​(java.lang.String pContent,
                                          OnlinePAFPlayer pWrittenTo,
                                          PAFPlayer pSender)
        Delivers a message that was send, while a player was offline
        Parameters:
        pContent - Content of the message
        pWrittenTo - The player which was written to
        pSender - The name of the sender
      • onTabComplete

        public void onTabComplete​(net.md_5.bungee.api.event.TabCompleteEvent pEvent)