Class ChatPicker
java.lang.Object
io.github.icrazyblaze.twitchmod.chat.ChatPicker
This class is responsible for picking commands from chat and running them.
- See Also:
- ChatCommands
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic intstatic booleanstatic booleanstatic booleanstatic booleanstatic boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidChecks the command against the blacklist, unless force commands is enabled.static voidstatic booleanAttempts to parse and then execute a command.static booleandoCommandMultiplayer(String message, String sender)Attempts to run a command for every player in the affected players list.static voidPicks a random chat message, and checks if it is a command.
- 
Field Details- 
chatBuffer
- 
chatSenderBuffer
- 
cooldownEnabledpublic static boolean cooldownEnabled
- 
forceCommandspublic static boolean forceCommands
- 
instantCommandspublic static boolean instantCommands
- 
enabledpublic static boolean enabled
- 
logMessagespublic static boolean logMessages
- 
tempChatLog
- 
chatLogLengthpublic static int chatLogLength
 
- 
- 
Constructor Details- 
ChatPickerpublic ChatPicker()
 
- 
- 
Method Details- 
checkChatChecks the command against the blacklist, unless force commands is enabled. If the chat should be logged for writing into a book then that is also done here.- Parameters:
- message- The chat message
- sender- The sender's name
 
- 
doCommandMultiplayerAttempts to run a command for every player in the affected players list.- Parameters:
- message- The chat command, e.g. "!creeper"
- sender- The sender's name, which is used in some commands.
- Returns:
- If the command doesn't run, then this method returns false.
- Since:
- 3.5.0
 
- 
doCommandAttempts to parse and then execute a command.- Parameters:
- message- The chat command, e.g. "!creeper"
- sender- The sender's name, which is used in some commands.
- Returns:
- If the command doesn't run, then this method returns false.
 
- 
pickRandomChatpublic static void pickRandomChat()Picks a random chat message, and checks if it is a command. If the chat message is a command, it will be run. Otherwise, a new message is picked.
- 
commandFailedpublic static void commandFailed()
 
-