Package net.guizhanss.guizhanlib.common
Class Cooldown<K>
java.lang.Object
net.guizhanss.guizhanlib.common.Cooldown<K>
- Type Parameters:
K- The type of key.
This class provides cooldown feature, based on keys.
- Author:
- ybw0014
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Cooldown
public Cooldown()
-
-
Method Details
-
check
Query if the key can be used.- Parameters:
key- The key.- Returns:
- Whether the key can be used.
-
set
Set cooldown of key.- Parameters:
key- The key.time- The cooldown in milliseconds.
-