Class ArenaConditionGroup

java.lang.Object
de.marcely.bedwars.api.arena.picker.condition.ArenaCondition
de.marcely.bedwars.api.arena.picker.condition.ArenaConditionGroup

public class ArenaConditionGroup extends ArenaCondition
A collection that persists of ArenaCondition to which we are applying logical conjunctions.

This ArenaCondition type only does either AND or OR operations.

  • Constructor Details

    • ArenaConditionGroup

      public ArenaConditionGroup()
    • ArenaConditionGroup

      public ArenaConditionGroup(List<ArenaCondition> childs)
  • Method Details

    • getChildrens

      public List<ArenaCondition> getChildrens()
      Gets all childrens that have been aded.

      The returned collection is by default fully mutable.
      It may not only be in case an immutable type has been passed with ArenaConditionGroup(List):

      Returns:
      A collection with all the childs added to this group
    • isAND

      public boolean isAND()
      Whether all childrens are being checked using the AND operator.
      Returns:
      Whether AND is currently defined as the operator. true if it is
    • isOR

      public boolean isOR()
      Whether all childrens are being checked using the OR operator.
      Returns:
      Whether OR is currently defined as the operator. true if it is
    • setAND

      public void setAND()
      Use the AND operator.
    • setOR

      public void setOR()
      Use the OR operator.
    • check

      public boolean check(Arena arena)
      Description copied from class: ArenaCondition
      Checks whether the given arena fullfills the conditions or not.
      Specified by:
      check in class ArenaCondition
      Parameters:
      arena - The local arena that is being checked
      Returns:
      true in case it may pass
    • check

      public boolean check(RemoteArena arena)
      Description copied from class: ArenaCondition
      Checks whether the given arena fullfills the conditions or not.
      Specified by:
      check in class ArenaCondition
      Parameters:
      arena - The remote arena that is being checked
      Returns:
      true in case it may pass
    • toString

      public String toString()
      Overrides:
      toString in class Object