Class MSG
- java.lang.Object
-
- net.md_5.bungee.api.plugin.Command
-
- de.simonsator.partyandfriends.api.TopCommand
-
- de.simonsator.partyandfriends.api.OnlyTopCommand
-
- de.simonsator.partyandfriends.friends.commands.MSG
-
- All Implemented Interfaces:
net.md_5.bungee.api.plugin.Listener
public class MSG extends OnlyTopCommand
Will be executed on /msg
-
-
Field Summary
-
Fields inherited from class de.simonsator.partyandfriends.api.TopCommand
subCommands
-
-
Constructor Summary
Constructors Constructor Description MSG(java.lang.String[] friendsAliasMsg, java.lang.String pPrefix)
Initials the command
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deliverOfflineMessage(java.lang.String pContent, OnlinePAFPlayer pWrittenTo, PAFPlayer pSender)
Delivers a message that was send, while a player was offlinestatic MSG
getInstance()
protected void
onCommand(OnlinePAFPlayer pPlayer, java.lang.String[] args)
Decides if a subcommand should be called and if which one.void
onTabComplete(net.md_5.bungee.api.event.TabCompleteEvent pEvent)
void
send(OnlinePAFPlayer pPlayer, java.lang.String[] args, int type)
Send a message from a sender to a receiver-
Methods inherited from class de.simonsator.partyandfriends.api.OnlyTopCommand
tabComplete
-
Methods inherited from class de.simonsator.partyandfriends.api.TopCommand
addCommand, count, execute, getPrefix, getSubCommand, isPlayer, playerComplete, sort, topCommandComplete
-
-
-
-
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 classTopCommand
- 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
- Senderargs
- Argumentstype
- 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 messagepWrittenTo
- The player which was written topSender
- The name of the sender
-
onTabComplete
public void onTabComplete(net.md_5.bungee.api.event.TabCompleteEvent pEvent)
-
-