Package com.Moshu.Misc
Class Cooldown
java.lang.Object
com.Moshu.Misc.Cooldown
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiderror()Sends an error message to the player.intgetDays()intgetHours()intgetName()org.bukkit.entity.Playerstatic doublegetRemainingTime(UUID uuid, String kit) static intgetRemainingTimeMinutes(UUID uuid, String name) static intgetRemainingTimeSeconds(UUID uuid, String name) intgetUUID()booleanhas()Checks if the player has an active cooldown of this typestatic booleanhasCooldown(UUID uuid, String name) intGet remaining timevoidremove()Removes the cooldown if the time ran upvoidset()Sets the cooldown as activestatic voidsetCooldowns(UUID uuid, String name, int seconds) This can be used for every case, while the old method works only for Kits. 
- 
Field Details
- 
cooldowns
 - 
plugin
 
 - 
 - 
Constructor Details
- 
Cooldown
 - 
Cooldown
Easily set cooldowns for anything- Parameters:
 uuid- , the player's uuidname- , the cooldown's nameseconds- , the time in seconds for the cooldown
 
 - 
 - 
Method Details
- 
set
public void set()Sets the cooldown as active - 
has
public boolean has()Checks if the player has an active cooldown of this type- Returns:
 - true/false
 
 - 
remove
public void remove()Removes the cooldown if the time ran up - 
getName
 - 
getPlayer
public org.bukkit.entity.Player getPlayer() - 
getUUID
 - 
getSeconds
public int getSeconds() - 
getMinutes
public int getMinutes() - 
getHours
public int getHours() - 
getDays
public int getDays() - 
remainingTime
public int remainingTime()Get remaining time- Returns:
 - remaining time in minutes
 
 - 
error
public void error()Sends an error message to the player. - 
setCooldowns
This can be used for every case, while the old method works only for Kits.- Parameters:
 uuid- player's uuidname- cooldown nameseconds- the cooldown time in seconds
 - 
hasCooldown
- Parameters:
 uuid- the player's uuidname- cooldown name- Returns:
 - true if the player has a cooldown active and false if he doesn't
 
 - 
getRemainingTime
- Parameters:
 uuid- player's uuidkit- the kit you want to get the cooldown of- Returns:
 - the remaining cooldown in hours
 
 - 
getRemainingTimeMinutes
- Parameters:
 uuid- player's uuidname- the cooldown you want to get the cooldown of- Returns:
 - the remaining cooldown in minutes
 
 - 
getRemainingTimeSeconds
 
 -