Class AttributeLevels

java.lang.Object
fr.andross.banitem.utils.attributes.AttributeLevels

public final class AttributeLevels extends Object
An attribute wrapper class that stores the levels and the comparator in which the attribute must match.
Version:
3.4
Author:
EpiCanard
  • 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 level
      comparator - The level comparator
    • AttributeLevels

      public AttributeLevels(@NotNull @NotNull Double minLevel, @NotNull @NotNull Double maxLevel)
      Instantiate an attribute with a comparator between the minLevel and maxLevel.
      Parameters:
      minLevel - The minimum level required to represents this attribute
      maxLevel - The maximum level required to represents this attribute
  • Method Details

    • matches

      @NotNull public @NotNull Boolean matches(@NotNull @NotNull Double level)
      Define if the param level match with the attribute levels.
      Parameters:
      level - Level to check if it matches
      Returns:
      if the input level match