BlueBeard.Cooldowns
0.1.0-ci.24
This is a prerelease version of BlueBeard.Cooldowns.
dotnet add package BlueBeard.Cooldowns --version 0.1.0-ci.24
NuGet\Install-Package BlueBeard.Cooldowns -Version 0.1.0-ci.24
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlueBeard.Cooldowns" Version="0.1.0-ci.24" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlueBeard.Cooldowns" Version="0.1.0-ci.24" />
<PackageReference Include="BlueBeard.Cooldowns" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlueBeard.Cooldowns --version 0.1.0-ci.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlueBeard.Cooldowns, 0.1.0-ci.24"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlueBeard.Cooldowns@0.1.0-ci.24
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlueBeard.Cooldowns&version=0.1.0-ci.24&prerelease
#tool nuget:?package=BlueBeard.Cooldowns&version=0.1.0-ci.24&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BlueBeard.Cooldowns
Centralised cooldown / timer tracking for Unturned plugins. In-memory by default, with an optional MySQL-backed variant for cooldowns that must survive server restarts.
Features
CooldownManager— synchronous, in-memory, lazy-cleanupTryUse(key, duration)— atomic check-and-start for "once per N seconds" gameplay rulesCancelByPrefix— bulk clear by domain or entity- Clock injection via constructor for deterministic tests
PersistentCooldownManager— same API plus automatic MySQL persistence viaBlueBeard.Database
Quick example
var cooldowns = new CooldownManager();
cooldowns.Load();
// Trigger an ability only if the player isn't already on cooldown:
var key = $"dash.{player.CSteamID.m_SteamID}";
if (cooldowns.TryUse(key, 8f))
GrantDash(player);
else
UnturnedChat.Say(player, $"Dash on cooldown ({cooldowns.GetRemaining(key):F1}s)");
Persistent variant
db.RegisterEntity<BBCooldownRow>();
db.Load();
var cooldowns = new PersistentCooldownManager();
cooldowns.Initialize(db);
cooldowns.Load(); // loads unexpired rows back into memory
Cooldowns set via Start / TryUse are then written to the bb_cooldowns table asynchronously and survive restarts.
See docs/Cooldowns/ in the Infrastructure repo for full reference.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net481 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8.1
- BlueBeard.Core (>= 0.1.0-ci.24)
- BlueBeard.Database (>= 0.1.0-ci.24)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-ci.24 | 77 | 7/4/2026 |
| 0.1.0-ci.23 | 78 | 6/25/2026 |
| 0.1.0-ci.22 | 85 | 5/8/2026 |
| 0.1.0-ci.19 | 67 | 5/7/2026 |
| 0.1.0-ci.18 | 63 | 5/7/2026 |
| 0.1.0-ci.17 | 59 | 5/3/2026 |
| 0.1.0-ci.16 | 73 | 5/3/2026 |
| 0.1.0-ci.15 | 79 | 4/13/2026 |
| 0.1.0-ci.14 | 69 | 4/12/2026 |
| 0.1.0-ci.13 | 62 | 4/12/2026 |
| 0.1.0-ci.12 | 64 | 4/12/2026 |
| 0.1.0-ci.11 | 69 | 4/12/2026 |
| 0.1.0-ci.10 | 74 | 4/11/2026 |