Class AntispamResult

java.lang.Object
me.remigio07.chatplugin.api.server.chat.antispam.AntispamResult

public abstract class AntispamResult extends Object
  • Constructor Details

    • AntispamResult

      public AntispamResult()
  • Method Details

    • getReason

      public DenyChatReason<AntispamManager> getReason()
      Gets the reason why the message should be blocked.

      Will return null if isAllowed().

      Returns:
      Reason why the message should be blocked
    • getDisallowedText

      public String getDisallowedText()
      Gets the disallowed text in the message that triggered the antispam.

      Will return null if isAllowed().

      Returns:
      Disallowed text in the message
    • getHighlightedMessage

      public String getHighlightedMessage()
      Gets the message with highlighted disallowed text.

      Will return null if isAllowed().

      Returns:
      Message with highlighted disallowed text
    • isAllowed

      public boolean isAllowed()
      Checks if the message is allowed by the antispam.
      Returns:
      Whether the message is allowed