Package me.hsgamer.bettergui.requirement
Class RequirementApplier
- java.lang.Object
-
- me.hsgamer.bettergui.requirement.RequirementApplier
-
- All Implemented Interfaces:
BiConsumer<UUID,TaskProcess>
,ProcessApplier
public class RequirementApplier extends Object implements ProcessApplier
The requirement setting used in Menus/Buttons/...
-
-
Field Summary
Fields Modifier and Type Field Description static RequirementApplier
EMPTY
The empty requirement applier
-
Constructor Summary
Constructors Constructor Description RequirementApplier(List<RequirementSet> requirementSets, ActionApplier failActionApplier)
Create a new requirement applierRequirementApplier(Menu menu, String name, Map<String,Object> section)
Create a new requirement applier
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(UUID uuid, TaskProcess process)
static Map<BukkitClickType,RequirementApplier>
convertClickRequirementAppliers(Map<String,Object> section, WrappedButton button)
Convert the section to a map of click requirement appliersRequirement.Result
getResult(UUID uuid)
Get the result of the requirementboolean
isEmpty()
Check if the applier is empty-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
-
-
-
Field Detail
-
EMPTY
public static final RequirementApplier EMPTY
The empty requirement applier
-
-
Constructor Detail
-
RequirementApplier
public RequirementApplier(List<RequirementSet> requirementSets, ActionApplier failActionApplier)
Create a new requirement applier- Parameters:
requirementSets
- the requirement setsfailActionApplier
- the fail action applier
-
-
Method Detail
-
convertClickRequirementAppliers
public static Map<BukkitClickType,RequirementApplier> convertClickRequirementAppliers(Map<String,Object> section, WrappedButton button)
Convert the section to a map of click requirement appliers- Parameters:
section
- the sectionbutton
- the button- Returns:
- the map
-
isEmpty
public boolean isEmpty()
Check if the applier is empty- Returns:
- true if it is empty
-
getResult
public Requirement.Result getResult(UUID uuid)
Get the result of the requirement- Parameters:
uuid
- the unique id- Returns:
- the result
-
accept
public void accept(UUID uuid, TaskProcess process)
- Specified by:
accept
in interfaceBiConsumer<UUID,TaskProcess>
-
-