Class AdvancementVisibility
java.lang.Object
eu.endercentral.crazy_advancements.advancement.AdvancementVisibility
Represents the conditions under which an Advancement is visible
- Author:
- Axel
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AdvancementVisibility
Advancements with this Visibility will always be visiblestatic final AdvancementVisibility
Advancements with this Visibility will be visible once they are granted or any of their children is granted (Similar to Vanilla "hidden")static final AdvancementVisibility
Advancements with this Visibility will be visible once their parent or any of their children is grantedstatic final AdvancementVisibility
Advancements with this Visibility will be visible once their parent or grandparent or any of their children is granted (Similar to Vanilla behavior) -
Constructor Summary
ConstructorDescriptionConstructor for creating custom Advancement Visibility -
Method Summary
Modifier and TypeMethodDescriptiongetName()
boolean
abstract boolean
isVisible
(Player player, Advancement advancement) Do not call this method directly, useAdvancementVisibility
to get accurate visibility datastatic AdvancementVisibility
parseVisibility
(String name) Parses a visibility
-
Field Details
-
ALWAYS
Advancements with this Visibility will always be visible -
PARENT_GRANTED
Advancements with this Visibility will be visible once their parent or any of their children is granted -
VANILLA
Advancements with this Visibility will be visible once their parent or grandparent or any of their children is granted (Similar to Vanilla behavior) -
HIDDEN
Advancements with this Visibility will be visible once they are granted or any of their children is granted (Similar to Vanilla "hidden")
-
-
Constructor Details
-
AdvancementVisibility
public AdvancementVisibility()Constructor for creating custom Advancement Visibility
-
-
Method Details
-
isVisible
Do not call this method directly, useAdvancementVisibility
to get accurate visibility data- Parameters:
player
- Player to checkadvancement
- Advancement to check- Returns:
- true if advancement should be visible
-
isAlwaysVisibleWhenAnyChildIsGranted
public boolean isAlwaysVisibleWhenAnyChildIsGranted()- Returns:
- true if advancement should always be visible if any child is granted, defaults to true
-
getName
- Returns:
- Custom Name, only for pre-defined visibilities:
ALWAYS
,PARENT_GRANTED
,VANILLA
,HIDDEN
-
parseVisibility
Parses a visibility
-