Skip to content

Commit

Permalink
Add missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Draycia committed May 29, 2024
1 parent a98db8e commit 633f68d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions api/src/main/java/net/draycia/carbon/api/channels/ChatChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,32 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
*/
boolean emptyRadiusRecipientsMessage();

/**
* The time in milliseconds between player messages.
* -1 and 0 disable the cooldown for this channel.
*
* @return The message cooldown in millis.
* @since 3.0.0
*/
long cooldown();

/**
* The epoch time (millis) when the player's cooldown expires.
*
* @param player The player
* @return The epoch time (millis) when the player's cooldown expires.
* @since 3.0.0
*/
long playerCooldown(CarbonPlayer player);

/**
* Starts the cooldown timer for the specified player. Duration will be the channel cooldown.
* Returns the player's old cooldown time, if they have one.
*
* @param player The player
* @return The player's old cooldown, or 0 if they don't have one.
* @since 3.0.0
*/
long startCooldown(CarbonPlayer player);

}

0 comments on commit 633f68d

Please sign in to comment.