Advancementcreator

A minecraft spigot library for rapid advancement creation.
Alternatives To Advancementcreator
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Paper7,268
20 hours ago1December 14, 2021469otherJava
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Geyser3,812
21 hours ago345mitJava
A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
Worldedit2,725
2 days ago147otherJava
🗺️ Minecraft map editor and mod
Dynmap1,814
5 days ago67apache-2.0Java
A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations.
Minestom1,799
3 days ago191apache-2.0Java
1.19.2 Lightweight Minecraft server
Glowstone1,752
2 months ago62otherJava
A fast, customizable and compatible open source server for Minecraft: Java Edition
Luckperms1,68816 days ago5February 09, 202250mitJava
A permissions plugin for Minecraft servers.
Catserver1,670
11 days ago39lgpl-3.0Java
高性能和高兼容性的1.12.2/1.16.5/1.18.2版本Forge+Bukkit+Spigot服务端 (A high performance and high compatibility 1.12.2/1.16.5/1.18.2 version Forge+Bukkit+Spigot server)
Minecraftdeveloperguide1,609
20 days ago3
📝Minecraft developer Chinese guide,我的世界开发者中文指南
Essentials1,580
a day ago161gpl-3.0Java
The modern Essentials suite for Spigot and Paper.
Alternatives To Advancementcreator
Select To Compare


Alternative Project Comparisons
Readme

Advancement Creator

For the SpigotMC forum thread, click here.

Manually writing JSON files in order to create advancements one-by-one is a slow and menial process. This library aims to greatly reduce that work, allowing you to focus more on the creative side of the task. No JSON and only minimal Java knowledge are required to use this library. JavaDocs are present in the whole project, so you can begin working without any prior knowledge of how advancements work. The documentation is based on Skylinerw's advancement guide. Runtime validation instantly spots invalid setups, reducing the time needs to be spent on testing.

Features:

  • JavaDocs for all public parts of the project
  • Runtime parameter/combination validation
  • Nullable annotations wherever null is to be expected
  • Presets aiming to speed up development even more
  • Automatic advancement activation with minimal performance impact
  • Great support for the whole Minecraft Advancement system (including all triggers, conditions and shared objects)
  • NamespacedKey support

What it lacks:

  • JSON string to Advancement class instance conversion (it only goes one way)
  • After much consideration, I decided to trade in immutability for faster development times.

Usage:

You can either download the source code and compile it yourself in order to include this project in your library, you can download the newest release from this page or you can use your favorite build system to always stay up to date. If you would like to check the JavaDocs online, click here. This library comes with a single, shaded dependency: JetBrains Annotations (for the Nullable annotations)

Gradle

repositories {
  maven { url 'https://jitpack.io' }
}

dependencies {
  compile 'com.github.Trigary:AdvancementCreator:v2.0'
}

Maven

<repositories>
  <repository>
   <id>jitpack.io</id>
   <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependencies>
 <dependency>
  <groupId>com.github.Trigary</groupId>
  <artifactId>AdvancementCreator</artifactId>
  <version>v2.0</version>
 </dependency>
</dependencies>

Sample

The goal of this library is to make advancement creation as fast and as simple as possible, so that's what this snippet aims to demonstrate:

public class Main extends JavaPlugin {
    @Override
    public void onEnable() {
        //This line configures the followings: create the NamespacedKeys in this plugin's namespace,
        //activate the advancements but don't instantly reload the data cache
        AdvancementFactory factory = new AdvancementFactory(this, true, false);
        
        //Create a root advancement which is also automatically unlocked (with a player head icon)
        Advancement root = factory.getRoot("newbie/root", "Getting Started", "Newbie Advancements", Material.PLAYER_HEAD, "block/dirt");
        
        //One of the most common advancements, the requirement is that you obtain an item:
        Advancement wood = factory.getItem("newbie/wood", root, "Chopper", "Chop down a tree", Material.OAK_LOG);
        Advancement workbench = factory.getItem("newbie/workbench", wood, "Crafter", "Craft yourself a crafting table", Material.CRAFTING_TABLE);
        Advancement sword = factory.getAnyItem("newbie/sword", workbench, "Armed to Teeth", "Craft a sword", Material.WOODEN_SWORD, Material.STONE_SWORD);
        
        //I could still use a factory, but I wanted to give an example of how development works without it:
        new Advancement(new NamespacedKey(this, "newbie/kill"), new ItemObject().setItem(Material.STONE_SWORD),
                new TextComponent("Harvester"), new TextComponent("Put your weapon to good use"))
                .addTrigger("kill", new PlayerKilledEntityTrigger())
                .makeChild(sword.getId())
                .setFrame(Advancement.Frame.GOAL)
                .setRewards(new Rewards().setExperience(10))
                .activate(false);
        
        //Reload the data cache after all advancements have been added
        Bukkit.reloadData();
    }
}

image of the resulting advancement tab

Contributing

All contributions are greatly appreciated, be that a pull request, an issue or a message with an idea/suggestion.

Popular Spigot Projects
Popular Minecraft Projects
Popular Games Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Minecraft
Spigot