-
Notifications
You must be signed in to change notification settings - Fork 1
Cooldowns
Hempfest edited this page Apr 16, 2021
·
1 revision
(Example taken from ClansPro)
public class CooldownRespawn extends Cooldown {
private final UUID id;
private final long time;
public CooldownRespawn(UUID player) {
this.id = player;
this.time = abv(5); // abv = absolute value, 5 = seconds
}
@Override
public String getId() {
return "ClansPro-war-respawn-" + id.toString(); // Set your cooldown's id
}
@Override
public long getCooldown() {
return time;
}
}
(Set your cooldown)
Cooldown respawn = new CooldownRespawn(player.getUniqueId());
respawn.save();
(Check your cooldown)
Cooldown respawn = Cooldown.getById("ClansPro-war-respawn-" + player.getUniqueId().toString());
if (respawn.isComplete()) {
Cooldown.remove(respawn);
}
For a full list of methods try using this in your IDE!
-
- AFK Player Utility
- Command Builder
- Command Utility
- Complete GUI Builder
- Complete Head Database/Locator
- Cooldown Abstraction
- Custom Gradient Color Interface
- Custom ID Generation
- Directional Enumeration
- Economy Interface Wrapper
- Entity Creation Tools
- File Management
- Item Recipe Builder
- Item Modification Builder
- Legacy Safe NamespacedKey
- Listing Collections
- Material Matcher
- Message Formatter
- String Utility
- Tab Completion Builder
- Task Scheduling
- Template Creation
- TextComponent Builder
- Vault Permission Interface Wrapper