Class LocationCriterion
java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.criterion.LocationCriterion
- All Implemented Interfaces:
AdvancementCriterion
An advancement criterion evaluating the physical location (World and Biome) of the player.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<LocationCriterion> The codec used for serializing and deserializing the location criterion.static final CriterionType<LocationCriterion> The registered type definition for the location criterion. -
Constructor Summary
ConstructorsConstructorDescriptionLocationCriterion(String worldName, org.bukkit.block.Biome biome) Constructs a new LocationCriterion. -
Method Summary
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AdvancementCriterion
isMet
-
Field Details
-
CODEC
The codec used for serializing and deserializing the location criterion. -
TYPE
The registered type definition for the location criterion.
-
-
Constructor Details
-
LocationCriterion
Constructs a new LocationCriterion.- Parameters:
worldName- The name of the required world (nullable).biome- The required biome (nullable).
-
-
Method Details
-
getType
Description copied from interface:AdvancementCriterionRetrieves the type definition associated with this specific criterion instance. This is used for identifying the logic and serialization codec.- Specified by:
getTypein interfaceAdvancementCriterion- Returns:
- The
CriterionTypecharacterizing 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:
isMetin interfaceAdvancementCriterion- Parameters:
player- The player to evaluate.- Returns:
- True if the condition is met.
-