Class MaterialCategoryCondition

java.lang.Object
me.deecaad.core.mechanics.conditions.Condition
me.deecaad.core.mechanics.conditions.MaterialCategoryCondition
All Implemented Interfaces:
InlineSerializer<Condition>, Serializer<Condition>, net.kyori.adventure.key.Keyed, org.bukkit.Keyed

public class MaterialCategoryCondition extends Condition
  • Constructor Details

    • MaterialCategoryCondition

      public MaterialCategoryCondition()
      Default constructor for serializer.
    • MaterialCategoryCondition

      public MaterialCategoryCondition(MaterialCategoryCondition.MaterialCategory category)
  • Method Details

    • isAllowed0

      public boolean isAllowed0(CastData cast)
      Specified by:
      isAllowed0 in class Condition
    • getKey

      @NotNull public @NotNull org.bukkit.NamespacedKey getKey()
    • 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>
      Overrides:
      getWikiLink in class Condition
      Returns:
      The nullable link to the wiki.
    • serialize

      @NotNull public @NotNull Condition serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException
      Description copied from interface: Serializer
      Instantiates a new Object to be added into the finalized configuration. The object should be built off of SerializeData.getConfig(). If there is any misconfiguration (or any other issue preventing the construction of an object), then this method should throw a SerializerException. This method may not return null.
      Parameters:
      data - The non-null data containing config
      Returns:
      The non-null serialized data.
      Throws:
      me.deecaad.core.file.SerializerException - If there is an error in config.