https://github.com/jely2002/standalonecrazyadvancementsapi
CrazyAdvancementsAPI with Maven and as a standalone dependency
https://github.com/jely2002/standalonecrazyadvancementsapi
api java-8 maven-repository minecraft spigot
Last synced: 9 months ago
JSON representation
CrazyAdvancementsAPI with Maven and as a standalone dependency
- Host: GitHub
- URL: https://github.com/jely2002/standalonecrazyadvancementsapi
- Owner: jely2002
- License: other
- Created: 2020-03-12T22:55:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-20T01:47:57.000Z (about 5 years ago)
- Last Synced: 2025-04-13T05:51:25.714Z (about 1 year ago)
- Topics: api, java-8, maven-repository, minecraft, spigot
- Language: Java
- Homepage:
- Size: 138 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CrazyAdvancementsAPI - Standalone Edition
[](https://jitpack.io/#jely2002/StandaloneCrazyAdvancementsAPI)
[](https://jitci.com/gh/jely2002/StandaloneCrazyAdvancementsAPI)
This is a fork of the CrazyAdvancementsAPI by ZockerAxel that has been made Maven compatible. This means that the API can now be used with Maven and as a standalone dependency that can be bundled with your plugin. This way there is no need for the server to also have the CrazyAdvancementsAPI plugin.
## Usage
The version of this API that you should use depends on the minecraft version your server/plugin is on. See the chart below.
| Minecraft version | API/dependency version |
| ------------- | ------------- |
| 1.16.4 | 1.14.1 |
| 1.16.3 | 1.13.10 |
| 1.16.2 | 1.13.9 |
| 1.16.1 | 1.13.8 |
| 1.15.x | 1.13.7 |
**Add the dependency to your pom.xml**
```xml
com.github.jely2002
StandaloneCrazyAdvancementsAPI
1.13.11
```
**Add the repository to your pom.xml**
```xml
jitpack.io
https://jitpack.io
```
## How to initialize the API
In order to initialize/disable the 'StandaloneCrazyAdvancementsAPI' you need to include the following code in your `onEnable()` and `onDisable()` methods. The rest of the process is almost the same as the original API.
**Example `onEnable()` & `onDisable()` methods:**
```java
@Override
public void onEnable() {
//Initializes the API. Requires the JavaPlugin the API gets used from.
CrazyAdvancements advancementsAPI = new CrazyAdvancements(this);
//Create a new advancementManager as per the original documentation
AdvancementManager advancementManager = new AdvancementManager(Player... players)
}
@Override
public void onDisable() {
//Disable the API
advancementsAPI.disable();
}
```
## How does the API work?
For more info on how you may use this API please take a look at the [original documentation](https://www.spigotmc.org/resources/crazy-advancements-api.51741/). There are also [javadocs](https://crazyadvancements.endercentral.eu/overview-summary.html) available, but please keep in mind the changes this Maven edition brings with.
## Credits
I would like to thank [ZockerAxel](https://github.com/ZockerAxel) for writing [the API](https://github.com/ZockerAxel/CrazyAdvancementsAPI) this Maven edition is based on.
This project has been made according to the GPL-3.0 license bundled with the original code. All changes can be seen through 'commits'.