PlayerAdvancements

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.advancement.PlayerAdvancements;

Members

award(advancement as Advancement, criteria as string) as bool
script.zs
// PlayerAdvancements.award(advancement as Advancement, criteria as string) as bool;
myPlayerAdvancements.award(myAdvancement, myString);

Parameters:

advancement Type: Advancement
criteria Type: string

Return Type: bool

flushDirty(player as ServerPlayer)
script.zs
// PlayerAdvancements.flushDirty(player as ServerPlayer);
myPlayerAdvancements.flushDirty(myServerPlayer);

Parameters:

player Type: ServerPlayer
getOrStartProgress(advancement as Advancement) as AdvancementProgress
script.zs
// PlayerAdvancements.getOrStartProgress(advancement as Advancement) as AdvancementProgress;
myPlayerAdvancements.getOrStartProgress(myAdvancement);

Parameters:

advancement Type: Advancement

Return Type: AdvancementProgress

revoke(advancement as Advancement, criteria as string) as bool
script.zs
// PlayerAdvancements.revoke(advancement as Advancement, criteria as string) as bool;
myPlayerAdvancements.revoke(myAdvancement, myString);

Parameters:

advancement Type: Advancement
criteria Type: string

Return Type: bool