Package dev.crafty.core.player
Class AntiSpam
java.lang.Object
dev.crafty.core.player.AntiSpam
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder class for configuring and sending messages with anti-spam checks. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AntiSpam.Builder
send()
Creates a newAntiSpam.Builder
instance for sending a message with anti-spam protection.
-
Constructor Details
-
AntiSpam
public AntiSpam()
-
-
Method Details
-
send
Creates a newAntiSpam.Builder
instance for sending a message with anti-spam protection.- Returns:
- a new Builder instance
-