HomeJavaModsAdvancementLib

AdvancementLib

Javadoc License Java Version PaperMC Modrinth Downloads

AdvancementLib is a modern, fluent Java library for creating custom advancements in PaperMC Minecraft plugins.
It lets you easily register and manage advancements that respond to any Bukkit event, using a powerful builder-based API.


✨ Features


🚀 Getting Started

1. Add as a Dependency

Add AdvancementLib as a dependency in your project using your preferred build tool or project setup method.

Note: Add the PaperMC repository if not already present.

2. Basic Usage

Register an Advancement

import io.github.lambdaphoenix.advancementLib.AdvancementAPI;

AdvancementAPI api = new AdvancementAPI(plugin);

api.register(BlockBreakEvent.class)
    .advancementKey("myplugin:break_10_stone")
    .condition(
        (player, event) -> event.getBlock().getType() == Material.STONE
    )
    .targetValue(10)
    .grantMode(GrantMode.ALL_AT_ONCE)
    .build();

Grant Modes

Custom Player Extractor

api.register(CustomEvent.class)
    .advancementKey("myplugin:custom_event")
    .playerExtractor(event -> event.getWhoDidIt())
    .build();

📚 API Highlights & Documentation

The latest Javadoc is automatically published to GitHub Pages:

➡️ View the Javadoc here

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more