Class AttributeLevels
java.lang.Object
fr.andross.banitem.utils.attributes.AttributeLevels
An attribute wrapper class that stores the levels and
the comparator in which the attribute must match.
- Version:
- 3.4
- Author:
- EpiCanard
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum to define how to compare attribute levels -
Constructor Summary
ConstructorsConstructorDescriptionAttributeLevels
(@NotNull Double level, @NotNull AttributeLevels.Comparator comparator) Instantiate an attribute which should match the specific level using the specified comparator.AttributeLevels
(@NotNull Double minLevel, @NotNull Double maxLevel) Instantiate an attribute with a comparator between the minLevel and maxLevel. -
Method Summary
-
Constructor Details
-
AttributeLevels
public AttributeLevels(@NotNull @NotNull Double level, @NotNull @NotNull AttributeLevels.Comparator comparator) Instantiate an attribute which should match the specific level using the specified comparator.- Parameters:
level
- The attribute levelcomparator
- The level comparator
-
AttributeLevels
Instantiate an attribute with a comparator between the minLevel and maxLevel.- Parameters:
minLevel
- The minimum level required to represents this attributemaxLevel
- The maximum level required to represents this attribute
-
-
Method Details
-
matches
Define if the param level match with the attribute levels.- Parameters:
level
- Level to check if it matches- Returns:
- if the input level match
-