PlayerAdvancements

Link to playeradvancements

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.advancement.PlayerAdvancements;

Name: award

Return Type: boolean

ZenScript
Copy
PlayerAdvancements.award(advancement as AdvancementHolder, criteria as string) as boolean
ParameterType
Parameter
advancement
Type
AdvancementHolder
Parameter
criteria
Type
string

Name: flushDirty

ZenScript
Copy
PlayerAdvancements.flushDirty(player as ServerPlayer)
ParameterType
Parameter
player
Type
ServerPlayer

Link to getOrStartProgress

Name: getOrStartProgress

Return Type: AdvancementProgress

ZenScript
Copy
PlayerAdvancements.getOrStartProgress(advancement as AdvancementHolder) as AdvancementProgress
ParameterType
Parameter
advancement
Type
AdvancementHolder

Name: revoke

Return Type: boolean

ZenScript
Copy
PlayerAdvancements.revoke(advancement as AdvancementHolder, criteria as string) as boolean
ParameterType
Parameter
advancement
Type
AdvancementHolder
Parameter
criteria
Type
string