Events
ModuleTriggerEvent
ModuleTriggerEventcom.kixmc.csapi.api.ModuleTriggerEvent
This event is fired by ChatSentry when a module triggers.
// get the violation/detection type
APIViolationType getType()
// get the context in which this event was triggered from (chat, command, etc)
APITriggerContext getContext()
// get the player who triggered this event
Player getPlayer()
// get the message before running through the module
String getOldContent()
// get the message after ran through the module
String getNewContent()
// get return the blocked content
String getBlockedContent()
// sets whether the event is cancelled
void setCancelled(boolean)
// returns whether the event is cancelled
boolean isCancelled()Violation types / supported modules
Any modules that have a violation/detection (APIViolationType) type associated with them are supported by this event. The below are valid detection types:
ON_COOLDOWNLINK_OR_AD_BLOCKMESSAGE_FILTER_BLOCKWORD_REPLACER_REPLACE(legacy)SPAM_BLOCKUNICODE_CHARACTER_BLOCKCAP_LIMITER_BLOCKANTI_PARROT_BLOCKANTI_CHAT_FLOOD_BLOCKANTI_STATUE_SPAMBOT_BLOCKANTI_JOIN_FLOOD_BLOCKCHAT_MODIFIER_MODIFY(legacy)CHAT_EXECUTOR_MATCH
Context types
Below are the valid APITriggerContext types:
CHATCOMMANDANVILBOOKSIGNJOINOTHER(currently unused)
Code examples
For testing if everything is working properly
Checking contexts and types
Cancelling under custom conditions
Last updated