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 SummaryFields Modifier and Type Field Description static RequirementApplierEMPTYThe empty requirement applier
 - 
Constructor SummaryConstructors 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 SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(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.ResultgetResult(UUID uuid)Get the result of the requirementbooleanisEmpty()Check if the applier is empty- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.function.BiConsumerandThen
 
- 
 
- 
- 
- 
Field Detail- 
EMPTYpublic static final RequirementApplier EMPTY The empty requirement applier
 
- 
 - 
Constructor Detail- 
RequirementApplierpublic RequirementApplier(List<RequirementSet> requirementSets, ActionApplier failActionApplier) Create a new requirement applier- Parameters:
- requirementSets- the requirement sets
- failActionApplier- the fail action applier
 
 
- 
 - 
Method Detail- 
convertClickRequirementApplierspublic static Map<BukkitClickType,RequirementApplier> convertClickRequirementAppliers(Map<String,Object> section, WrappedButton button) Convert the section to a map of click requirement appliers- Parameters:
- section- the section
- button- the button
- Returns:
- the map
 
 - 
isEmptypublic boolean isEmpty() Check if the applier is empty- Returns:
- true if it is empty
 
 - 
getResultpublic Requirement.Result getResult(UUID uuid) Get the result of the requirement- Parameters:
- uuid- the unique id
- Returns:
- the result
 
 - 
acceptpublic void accept(UUID uuid, TaskProcess process) - Specified by:
- acceptin interface- BiConsumer<UUID,TaskProcess>
 
 
- 
 
-