Class AddressCheck

java.lang.Object
studio.thevipershow.safechat.api.checks.ChatCheck
studio.thevipershow.safechat.chat.check.types.AddressCheck
All Implemented Interfaces:
Check

public final class AddressCheck
extends ChatCheck
  • Field Details

  • Constructor Details

  • Method Details

    • check

      public boolean check​(@NotNull @NotNull ChatData data)
      Perform a check on ChatData. The check can consist in anything, but it must follow these criteria: The check must return true if the player failed the check. The check must return false if the player passed the check.
      Parameters:
      data - The chat data.
      Returns:
      True if failed, false otherwise.
    • hasWarningEnabled

      public boolean hasWarningEnabled()
      Get the warning messages status.
      Returns:
      True if a warning message should be sent upon the player failing a check.
    • getWarningMessages

      @NotNull public @NotNull java.util.List<java.lang.String> getWarningMessages()
      Get the warning messages that will be displayed when the player fails a check.
      Returns:
      The warning messages.
    • replacePlaceholders

      @NotNull public @NotNull java.lang.String replacePlaceholders​(@NotNull @NotNull java.lang.String message, @NotNull @NotNull ChatData data)
      Provide placeholders for your own check. Replace any placeholder with your data.
      Parameters:
      message - The message that may contain placeholders.
      data - The data (used for placeholders).
      Returns:
      The message, modified if it had placeholders support.
    • getPunishmentRequiredValue

      public long getPunishmentRequiredValue()
      Get after how often should a player trigger a punish. For example 2 will mean each 2 failed checks, will trigger the punishment.
      Returns:
      The interval value.
    • getPunishmentCommand

      @NotNull public @NotNull java.lang.String getPunishmentCommand()
      Get the command to execute when a punishment is required. Placeholders may be used.
      Returns:
      The command to execute.
    • getLoggingEnabled

      public boolean getLoggingEnabled()
      Gets the status of logging for this check from the config
      Returns:
      if logging is enabled for this check