Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Adding and Removing Advancements

GamerCoder edited this page May 22, 2023 · 2 revisions

Players cannot see all advancements constructed with Advancement.builder() automatically, and must manually be added using PlayerAdvancementManager.

Player player = ...
Advancement a1 = ...
Advancement a2 = ...

PlayerAdvancementManager manager = BukkitAdvancementManager.of(player);

// Makes Advancements visible on the Advancements Screen
manager.addAdvancement(a1, a2); 

// Makes Advancements not visible on the Advancements Screen
manager.removeAdvancement(a1, a2);
Clone this wiki locally