public class WauzRewards
extends java.lang.Object
| Constructor and Description |
|---|
WauzRewards() |
| Modifier and Type | Method and Description |
|---|---|
static void |
earnArcadeToken(org.bukkit.entity.Player player)
Adds a token from Arcade mode, if the limit of 20 has not been reached today.
|
static void |
earnDailyReward(org.bukkit.entity.Player player)
Gives a player coins, based on their rank, if the cooldown is ready.
|
static void |
earnMmoRpgToken(org.bukkit.entity.Player player)
Adds a token from MMORPG mode, if the limit of 30 has not been reached today.
|
static void |
earnOneBlockToken(org.bukkit.entity.Player player)
Adds a token from OneBlock mode, if the limit of 20 has not been reached today.
|
static void |
earnSurvivalToken(org.bukkit.entity.Player player)
Adds a token from Survival mode, if the limit of 20 has not been reached today.
|
private static void |
earnToken(org.bukkit.entity.Player player,
java.lang.String modeDisplay,
int earnedToday,
int maxToday)
Adds a token from the given mode.
|
private static int |
getTokensEarnedToday(org.bukkit.entity.Player player,
java.lang.String mode)
Gets the amount of tokens earned for the current date.
|
public static void earnDailyReward(org.bukkit.entity.Player player)
player - The player that should claim their daily reward.Cooldown.characterDailyReward(Player),
PlayerConfigurator.getRank(org.bukkit.OfflinePlayer),
PlayerCollectionConfigurator.setCharacterCoins(Player, long)public static void earnMmoRpgToken(org.bukkit.entity.Player player)
player - The player to receive the token.getTokensEarnedToday(Player, String),
earnToken(Player, String, int, int)public static void earnSurvivalToken(org.bukkit.entity.Player player)
player - The player to receive the token.earnToken(Player, String, int, int),
WauzCore.MAX_PLAYER_LEVEL_SURVIVAL,
PlayerConfigurator.setSurvivalScore(org.bukkit.OfflinePlayer, long)public static void earnOneBlockToken(org.bukkit.entity.Player player)
player - The player to receive the token.getTokensEarnedToday(Player, String),
earnToken(Player, String, int, int)public static void earnArcadeToken(org.bukkit.entity.Player player)
player - The player to receive the token.getTokensEarnedToday(Player, String),
earnToken(Player, String, int, int)private static int getTokensEarnedToday(org.bukkit.entity.Player player,
java.lang.String mode)
player - The player that earned the tokens.mode - The mode the tokens were earned in.WauzDateUtils.getDateLong(),
PlayerCollectionConfigurator.getTokenLimitDate(Player, String),
PlayerCollectionConfigurator.getTokenLimitAmount(Player, String)private static void earnToken(org.bukkit.entity.Player player,
java.lang.String modeDisplay,
int earnedToday,
int maxToday)
player - The player to receive the token.modeDisplay - The mode name, how it should be displayed.earnedToday - The amount of tokens earned today.maxToday - The maximum amount of tokens earnable per day.PlayerCollectionConfigurator.setTokenLimitDate(Player, String, long),
PlayerCollectionConfigurator.setTokenLimitAmount(Player, String, int),
PlayerCollectionConfigurator.setTokens(Player, long)