UltimateAdvancementAPI [1.15-1.21.4] icon

UltimateAdvancementAPI [1.15-1.21.4] -----

A powerful API to create custom advancements for your minecraft server.



The complete wiki can be found on the official GitHub page.

The following is a little example which creates an example advancement with a random description:
Code (Java):
public class MainClass extends JavaPlugin implements Listener {

    private AdvancementTab advancementTab ;
    private UltimateAdvancementAPI api ;

    @Override
    public void onEnable ( ) {
        api = UltimateAdvancementAPI. getInstance ( this ) ;

        advancementTab = api. createAdvancementTab ( "your_tab_name" ) ;

       AdvancementDisplay rootDisplay = new AdvancementDisplay (Material. GRASS_BLOCK, "Example", AdvancementFrameType. TASK, true, true, 0, 0, "A random", "description." ) ;

        RootAdvancement root = new RootAdvancement (advancementTab, "root", rootDisplay, "textures/block/stone.png" ) ;

        advancementTab. registerAdvancements (root ) ;

        Bukkit. getPluginManager ( ). registerEvents ( this, this ) ;
    }

    @EventHandler
    public void onJoin (PlayerLoadingCompletedEvent e ) {
        // Called after a player has successfully been loaded by the API
        Player p = e. getPlayer ( ) ;
        // Here you can show tabs to players
        advancementTab. showTab (p ) ;
    }
}
Result:
[​IMG]
Resource Information
Author:
----------
Total Downloads: 6,419
First Release: Aug 23, 2021
Last Update: Dec 13, 2024
Category: ---------------
All-Time Rating:
14 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings