add placeholders for confirmation message

This commit is contained in:
okx-code
2018-08-29 21:24:28 +01:00
parent a748321d89
commit c5bc6f8fac
15 changed files with 73 additions and 80 deletions
@@ -1,7 +1,6 @@
package sh.okx.rankup.ranks.requirements;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.entity.Player;
import sh.okx.rankup.Rankup;
@@ -43,6 +42,7 @@ public abstract class Requirement implements Cloneable {
/**
* Check if a player meets this requirement
*
* @param player the player to check
* @return true if they meet the requirement, false otherwise
*/
@@ -51,11 +51,13 @@ public abstract class Requirement implements Cloneable {
/**
* Get the remaining amount needed for <code>Requirement#check(Player)</code> to yield true.
* This is not required and is only used in placeholders.
*
* @param player the player to find the remaining amount of
* @return the remaining amount needed. Should be non-negative.
*/
public double getRemaining(Player player) {
return getValueDouble();
}
public abstract Requirement clone();
}