{"id":17022119,"url":"https://github.com/trigary/advancementcreator","last_synced_at":"2025-04-12T09:32:23.904Z","repository":{"id":193083812,"uuid":"115743251","full_name":"Trigary/AdvancementCreator","owner":"Trigary","description":"A minecraft spigot library for rapid advancement creation.","archived":false,"fork":false,"pushed_at":"2020-10-13T15:15:24.000Z","size":81,"stargazers_count":26,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-31T11:51:40.730Z","etag":null,"topics":["minecraft","minecraft-api","minecraft-plugin","spigot","spigot-api","spigot-library","spigot-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trigary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-12-29T17:59:13.000Z","updated_at":"2024-07-19T01:06:26.000Z","dependencies_parsed_at":"2023-09-06T18:30:26.503Z","dependency_job_id":null,"html_url":"https://github.com/Trigary/AdvancementCreator","commit_stats":null,"previous_names":["trigary/advancementcreator"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trigary%2FAdvancementCreator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trigary%2FAdvancementCreator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trigary%2FAdvancementCreator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trigary%2FAdvancementCreator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trigary","download_url":"https://codeload.github.com/Trigary/AdvancementCreator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223510342,"owners_count":17157306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minecraft","minecraft-api","minecraft-plugin","spigot","spigot-api","spigot-library","spigot-plugin"],"created_at":"2024-10-14T07:09:22.519Z","updated_at":"2024-11-07T12:04:12.209Z","avatar_url":"https://github.com/Trigary.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advancement Creator [![](https://jitpack.io/v/Trigary/AdvancementCreator.svg)](https://jitpack.io/#Trigary/AdvancementCreator)\n\n*For the SpigotMC forum thread, click [here](https://www.spigotmc.org/threads/advancement-creator-rapid-advancement-creation-library.293465/).*\n\nManually writing JSON files in order to create advancements one-by-one is a slow and menial process.\nThis library aims to greatly reduce that work, allowing you to focus more on the creative side of the task.\nNo JSON and only minimal Java knowledge are required to use this library.\nJavaDocs are present in the whole project, so you can begin working without any prior knowledge of how advancements work.\nThe documentation is based on [Skylinerw's advancement guide](https://github.com/skylinerw/guides/blob/master/java/advancements.md).\nRuntime validation instantly spots invalid setups, reducing the time needs to be spent on testing.\n\n## Features:\n - JavaDocs for all public parts of the project\n - Runtime parameter/combination validation\n - Nullable annotations wherever *null* is to be expected\n - Presets aiming to speed up development even more\n - Automatic advancement activation with minimal performance impact\n - Great support for the whole Minecraft Advancement system (including all triggers, conditions and shared objects)\n - NamespacedKey support\n\n## What it lacks:\n - JSON string to Advancement class instance conversion (it only goes one way)\n - After much consideration, I decided to trade in immutability for faster development times.\n\n## Usage:\nYou 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](https://github.com/Trigary/AdvancementCreator/releases) or you can use your favorite build system to always stay up to date.\nIf you would like to check the JavaDocs online, click [here](http://trigary.hu/javadocs/advancement-creator/).\nThis library comes with a single, shaded dependency: JetBrains Annotations (for the Nullable annotations)\n\n### Gradle\n```groovy\nrepositories {\n  maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n  compile 'com.github.Trigary:AdvancementCreator:v2.0'\n}\n```\n\n### Maven\n\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n   \u003cid\u003ejitpack.io\u003c/id\u003e\n   \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n \u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.Trigary\u003c/groupId\u003e\n  \u003cartifactId\u003eAdvancementCreator\u003c/artifactId\u003e\n  \u003cversion\u003ev2.0\u003c/version\u003e\n \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## Sample\nThe goal of this library is to make advancement creation as fast and as simple as possible,\nso that's what this snippet aims to demonstrate:\n\n```java\npublic class Main extends JavaPlugin {\n    @Override\n    public void onEnable() {\n        //This line configures the followings: create the NamespacedKeys in this plugin's namespace,\n        //activate the advancements but don't instantly reload the data cache\n        AdvancementFactory factory = new AdvancementFactory(this, true, false);\n        \n        //Create a root advancement which is also automatically unlocked (with a player head icon)\n        Advancement root = factory.getRoot(\"newbie/root\", \"Getting Started\", \"Newbie Advancements\", Material.PLAYER_HEAD, \"block/dirt\");\n        \n        //One of the most common advancements, the requirement is that you obtain an item:\n        Advancement wood = factory.getItem(\"newbie/wood\", root, \"Chopper\", \"Chop down a tree\", Material.OAK_LOG);\n        Advancement workbench = factory.getItem(\"newbie/workbench\", wood, \"Crafter\", \"Craft yourself a crafting table\", Material.CRAFTING_TABLE);\n        Advancement sword = factory.getAnyItem(\"newbie/sword\", workbench, \"Armed to Teeth\", \"Craft a sword\", Material.WOODEN_SWORD, Material.STONE_SWORD);\n        \n        //I could still use a factory, but I wanted to give an example of how development works without it:\n        new Advancement(new NamespacedKey(this, \"newbie/kill\"), new ItemObject().setItem(Material.STONE_SWORD),\n                new TextComponent(\"Harvester\"), new TextComponent(\"Put your weapon to good use\"))\n                .addTrigger(\"kill\", new PlayerKilledEntityTrigger())\n                .makeChild(sword.getId())\n                .setFrame(Advancement.Frame.GOAL)\n                .setRewards(new Rewards().setExperience(10))\n                .activate(false);\n        \n        //Reload the data cache after all advancements have been added\n        Bukkit.reloadData();\n    }\n}\n```\n\n![image of the resulting advancement tab](https://i.imgur.com/C6yUGif.png)\n\n## Contributing\nAll contributions are greatly appreciated, be that a pull request, an issue or a message with an idea/suggestion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrigary%2Fadvancementcreator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrigary%2Fadvancementcreator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrigary%2Fadvancementcreator/lists"}