Class AntiSpam

java.lang.Object
dev.crafty.core.player.AntiSpam

public class AntiSpam extends Object
AntiSpam provides a mechanism to prevent players from sending repeated messages within a specified cooldown period. It uses a Caffeine cache to store cooldowns per player and message key.
Since:
1.0.22
  • Constructor Details

    • AntiSpam

      public AntiSpam()
  • Method Details

    • send

      public static AntiSpam.Builder send()
      Creates a new AntiSpam.Builder instance for sending a message with anti-spam protection.
      Returns:
      a new Builder instance