Class OperatorField<V>

java.lang.Object
studio.mevera.imperat.selector.field.AbstractField<V>
studio.mevera.imperat.selector.field.operators.OperatorField<V>
Type Parameters:
V - The type of the value that this field handles.
All Implemented Interfaces:
SelectionField<V>
Direct Known Subclasses:
LimitOperatorField

public abstract class OperatorField<V> extends AbstractField<V>
OperatorField is an abstract base class that extends AbstractField. It is designed to add additional operational functionality to the field it wraps.
  • Field Details

  • Constructor Details

    • OperatorField

      protected OperatorField(String name, studio.mevera.imperat.util.TypeWrap<V> type)
  • Method Details

    • parseFieldValue

      public abstract V parseFieldValue(String value, studio.mevera.imperat.context.CommandContext<BukkitCommandSource> context) throws studio.mevera.imperat.exception.CommandException
      Parses the given string representation of the value and converts it into the field's value type.
      Specified by:
      parseFieldValue in interface SelectionField<V>
      Parameters:
      value - the string representation of the value to be parsed
      context -
      Returns:
      the parsed value of the field's type
      Throws:
      studio.mevera.imperat.exception.CommandException - if the parsing fails
    • operate

      public abstract void operate(V value, List<org.bukkit.entity.Entity> entities)
      Performs an operation on the specified value and a list of entities.
      Parameters:
      value - the value to be operated on
      entities - the list of entities to be processed