Class ArenaConditionVariable<T extends ArenaConditionVariableValue<?>>
java.lang.Object
de.marcely.bedwars.api.arena.picker.condition.variable.ArenaConditionVariable<T>
- Type Parameters:
- T- inherits ArenaConditionVariableValue. It's equal to- getValueClass()
public abstract class ArenaConditionVariable<T extends ArenaConditionVariableValue<?>>
extends Object
Represents a variable that persists of a name and a type and is able to fetch a specific property of an arena at any time.
 
     Make sure to register it when constructing a custom one using ArenaPickerAPI.registerConditionVariable(ArenaConditionVariable).
 
- 
Constructor SummaryConstructorsConstructorDescriptionArenaConditionVariable(Plugin plugin, String name, Class<T> valueClass) Construct a new variable type.
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringgetName()The name of the variable.final PluginThe plugin that has constructed this instance.getType()Returns the type of this variable.abstract TFetches the value of a local arena.abstract TgetValue(RemoteArena arena) Fetches the value of a remote arena.The class of the value that is being fetched.final booleanReturns whether this instance is registered.
- 
Constructor Details- 
ArenaConditionVariableConstruct a new variable type.- Parameters:
- plugin- The plugin that is constructing it
- name- Must be in the following format: a-z, _, @, :. It is automatically being put into lower-case
- valueClass- Must be a ArenaConditionVariableTypeNumber or ArenaConditionVariableTypeSring
 
 
- 
- 
Method Details- 
getTypeReturns the type of this variable.- Returns:
- The type
 
- 
getPluginThe plugin that has constructed this instance.- Returns:
- The plugin behind its existence
 
- 
getNameThe name of the variable.It is always in lower-case and follows this format: a-z, _, @, : - Returns:
- The name
 
- 
getValueClassThe class of the value that is being fetched.- Returns:
- The value class that this variable returns
 
- 
isRegisteredpublic final boolean isRegistered()Returns whether this instance is registered.- Returns:
- Whether it is currently registered and useable
- See Also:
 
- 
getValueFetches the value of a local arena.The class of the returned object is equal to getValueClass().- Parameters:
- arena- The local arena
- Returns:
- The given property of this current moment
 
- 
getValueFetches the value of a remote arena.The class of the returned object is equal to getValueClass().- Parameters:
- arena- The remote arena
- Returns:
- The given property of this current moment
 
 
-