|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.armar.plugins.autorank.playerchecker.requirement.Requirement
public abstract class Requirement
Whenever you want to create a new requirement, you'll have to extend this class. Every requirement needs the following:
- Option to check if the requirement is optional.
- Results that will be performed when the requirement is completed. These results have to be one of the results registered in Autorank.
- Option to check if the requirement will auto complete.
| Field Summary | |
|---|---|
private Autorank |
autorank
|
| Constructor Summary | |
|---|---|
Requirement()
|
|
| Method Summary | |
|---|---|
Autorank |
getAutorank()
|
abstract java.lang.String |
getDescription()
Gets the description of the requirement Make sure this is always a translatable message. |
abstract java.lang.String |
getProgress(org.bukkit.entity.Player player)
Gets the current progress of a player on a certain requirement. |
abstract int |
getReqId()
Get the id of this requirement. |
abstract java.util.List<Result> |
getResults()
Gets the results when this requirement is finished |
boolean |
isCompleted(int reqID,
java.lang.String playerName)
Check if the requirement is completed already. |
abstract boolean |
isOptional()
Is this an optional requirement? |
abstract boolean |
meetsRequirement(org.bukkit.entity.Player player)
Does it meet the requirements? |
void |
setAutorank(Autorank autorank)
|
abstract boolean |
setOptions(java.lang.String[] options,
boolean optional,
java.util.List<Result> results,
boolean autoComplete,
int reqId)
Setup requirement specific objects. |
java.lang.String |
toString()
|
abstract boolean |
useAutoCompletion()
Use auto completion for this? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Autorank autorank
| Constructor Detail |
|---|
public Requirement()
| Method Detail |
|---|
public final void setAutorank(Autorank autorank)
public final Autorank getAutorank()
public abstract boolean setOptions(java.lang.String[] options,
boolean optional,
java.util.List<Result> results,
boolean autoComplete,
int reqId)
options - String[] containing values of the configoptional - Is this an optional requirement?results - ListautoComplete - Will this auto complete?reqId - id of the requirement
public abstract boolean meetsRequirement(org.bukkit.entity.Player player)
if (isCompleted(getReqId(), player.getName())) { return true; }
player - Player to check for
public abstract java.lang.String getDescription()
public abstract boolean isOptional()
public abstract java.util.List<Result> getResults()
public abstract boolean useAutoCompletion()
public java.lang.String toString()
toString in class java.lang.Object
public final boolean isCompleted(int reqID,
java.lang.String playerName)
reqID - Requirement id.playerName - Player to check for
public abstract java.lang.String getProgress(org.bukkit.entity.Player player)
player - Player to check for
public abstract int getReqId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||