Class ArenaConditionComparative
java.lang.Object
de.marcely.bedwars.api.arena.picker.condition.ArenaCondition
de.marcely.bedwars.api.arena.picker.condition.ArenaConditionComparative
Represents a data object for comparing two inputs with an operator.
-
Field Summary
Fields inherited from class ArenaCondition
ALWAYS_TRUE -
Constructor Summary
ConstructorsConstructorDescriptionArenaConditionComparative(ArenaConditionInput leftInput, ArenaConditionComparisonOperator comparisonOperator, ArenaConditionInput rightInput) ArenaConditionComparative(ArenaConditionVariable<?> variable, ArenaConditionComparisonOperator comparisonOperator, ArenaConditionVariableValue<?> validatingValue) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the given arena fullfills the conditions or not.booleancheck(RemoteArena arena) Checks whether the given arena fullfills the conditions or not.Returns the operator of this condition.Get the input of the left side that we want to check.Get the input of the right side that we want to check.booleanGet whether both comparatives are similar to each other.toString()Methods inherited from class ArenaCondition
filterLocalArenas, filterRemoteArenas
-
Constructor Details
-
ArenaConditionComparative
public ArenaConditionComparative(ArenaConditionVariable<?> variable, ArenaConditionComparisonOperator comparisonOperator, ArenaConditionVariableValue<?> validatingValue) -
ArenaConditionComparative
public ArenaConditionComparative(ArenaConditionInput leftInput, ArenaConditionComparisonOperator comparisonOperator, ArenaConditionInput rightInput)
-
-
Method Details
-
getLeftInput
Get the input of the left side that we want to check.- Returns:
- The input on the left side
-
getRightInput
Get the input of the right side that we want to check.- Returns:
- The input on the right side
-
getComparisonOperator
Returns the operator of this condition.- Returns:
- The operator
-
isSimilar
Get whether both comparatives are similar to each other.Basically checks for left and right input, if feasable.
- Parameters:
comp- The other comparative to check- Returns:
trueif they are similar similar to each other
-
check
Description copied from class:ArenaConditionChecks whether the given arena fullfills the conditions or not.- Specified by:
checkin classArenaCondition- Parameters:
arena- The local arena that is being checked- Returns:
truein case it may pass
-
check
Description copied from class:ArenaConditionChecks whether the given arena fullfills the conditions or not.- Specified by:
checkin classArenaCondition- Parameters:
arena- The remote arena that is being checked- Returns:
truein case it may pass
-
toString
-