Class LocationCriterion

java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.criterion.LocationCriterion
All Implemented Interfaces:
AdvancementCriterion

public class LocationCriterion extends Object implements AdvancementCriterion
An advancement criterion evaluating the physical location (World and Biome) of the player.
  • Field Details

  • Constructor Details

    • LocationCriterion

      public LocationCriterion(String worldName, org.bukkit.block.Biome biome)
      Constructs a new LocationCriterion.
      Parameters:
      worldName - The name of the required world (nullable).
      biome - The required biome (nullable).
  • Method Details

    • getType

      public CriterionType<?> getType()
      Description copied from interface: AdvancementCriterion
      Retrieves the type definition associated with this specific criterion instance. This is used for identifying the logic and serialization codec.
      Specified by:
      getType in interface AdvancementCriterion
      Returns:
      The CriterionType characterizing this instance.
    • isMet

      public boolean isMet(org.bukkit.entity.Player player)
      Checks if the player is currently inside the required world and biome.
      Specified by:
      isMet in interface AdvancementCriterion
      Parameters:
      player - The player to evaluate.
      Returns:
      True if the condition is met.