Class Condition

java.lang.Object
me.deecaad.core.mechanics.conditions.Condition
All Implemented Interfaces:
InlineSerializer<Condition>, Serializer<Condition>, net.kyori.adventure.key.Keyed, org.bukkit.Keyed
Direct Known Subclasses:
BiomeCondition, EntityTypeCondition, GlidingCondition, HasPermissionCondition, InConeCondition, LightLevelCondition, MaterialCategoryCondition, OnGroundCondition, RangeCondition, RidingCondition, SneakingCondition, SprintingCondition

public abstract class Condition extends Object implements InlineSerializer<Condition>
A condition is a simple true/false statement that decides whether a Mechanic is allowed to be used (on a specific entity, in a specific world, etc.).
  • Constructor Details

    • Condition

      public Condition()
  • Method Details

    • getWikiLink

      @Nullable public @Nullable String getWikiLink()
      Description copied from interface: Serializer
      Returns a link to the page on the wiki that describes this serializer. This method is called from SerializeData, and is used to help the user find potential solutions to their problem.
      Specified by:
      getWikiLink in interface Serializer<Condition>
      Returns:
      The nullable link to the wiki.
    • isAllowed

      public final boolean isAllowed(CastData cast)
      Returns true if Mechanic that holds this condition is allowed to be used.
      Parameters:
      cast - The non-null data involving the who/what/where.
      Returns:
      true if the mechanic can be used.
    • isAllowed0

      protected abstract boolean isAllowed0(CastData cast)
    • applyParentArgs

      protected Condition applyParentArgs(me.deecaad.core.file.SerializeData data, Condition condition) throws me.deecaad.core.file.SerializerException
      Throws:
      me.deecaad.core.file.SerializerException