Class TokenPerk
- java.lang.Object
-
- org.kikikan.deadbymoonlight.Configurable
-
- org.kikikan.deadbymoonlight.perks.Perk
-
- org.kikikan.deadbymoonlight.perks.TokenPerk
-
- All Implemented Interfaces:
java.lang.Comparable<Configurable>
public abstract class TokenPerk extends Perk
Represents a Perk which works with collectible tokens.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addToken(int amount)
Adds an amount (can be negative) to the total Tokens and then updates the Player's Display.protected int
getTokens()
Gets the amount of tokens.protected void
resetTokens()
Sets the amount of tokens to 0 and then updates the Player's Display.protected void
setupPerk()
Created for the other abstract Perk classes.-
Methods inherited from class org.kikikan.deadbymoonlight.perks.Perk
amountOfTotemsRequired, equals, getDescription, getDisplayItemStack, getDisplayName, getFileName, getPerkDescription, getPerkDescriptionForChat, getPerkItem, getPerkUser, hashCode, init, isKiller, isSurvivor, setDisplayItemStack, setDisplayStatus, setupPerkDisplay, toString
-
Methods inherited from class org.kikikan.deadbymoonlight.Configurable
compareTo, getAllValuesFromConfig, getDefaultEnabled, getFormattedName, getName, getPlugin, getRequirements, getValueFromConfig, isEnabled, toTextComponent
-
-
-
-
Constructor Detail
-
TokenPerk
public TokenPerk(org.bukkit.plugin.java.JavaPlugin plugin, PerkUser p)
-
-
Method Detail
-
setupPerk
protected final void setupPerk()
Description copied from class:Perk
Created for the other abstract Perk classes. Gets called just beforeonStart()
.
-
addToken
protected void addToken(int amount)
Adds an amount (can be negative) to the total Tokens and then updates the Player's Display. If the number of tokens is less than 0, it sets the number of Tokens to 0.- Parameters:
amount
- The amount of Tokens it should add (or subtract)
-
getTokens
protected int getTokens()
Gets the amount of tokens.- Returns:
- The amount of tokens.
-
resetTokens
protected void resetTokens()
Sets the amount of tokens to 0 and then updates the Player's Display.
-
-