Class RecipeConditions.ConditionSet

java.lang.Object
me.mehboss.utils.RecipeConditions.ConditionSet
Enclosing class:
RecipeConditions

public static final class RecipeConditions.ConditionSet extends Object
The full condition set for a recipe.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    “conditions” or “conditions_all” block (AND).
    “conditions_any” is a list of OR blocks.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    test(org.bukkit.Location loc, org.bukkit.entity.Player player)
    Fast-path test (no messages).
    boolean
    test(org.bukkit.Location loc, org.bukkit.entity.Player player, List<String> outReasons)
    Overall logic: (all == null || all passes) AND (any is empty OR at least one any-block passes) If outReasons is non-null, messages are added only for failing parts.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • all

      “conditions” or “conditions_all” block (AND).
    • any

      “conditions_any” is a list of OR blocks. If non-empty, at least one of these blocks must pass.
  • Constructor Details

    • ConditionSet

      public ConditionSet()
  • Method Details

    • isEmpty

      public boolean isEmpty()
    • test

      public boolean test(org.bukkit.Location loc, @Nullable org.bukkit.entity.Player player)
      Fast-path test (no messages).
    • test

      public boolean test(org.bukkit.Location loc, @Nullable org.bukkit.entity.Player player, @Nullable List<String> outReasons)
      Overall logic: (all == null || all passes) AND (any is empty OR at least one any-block passes) If outReasons is non-null, messages are added only for failing parts.