Skip to content
William edited this page Dec 29, 2024 · 4 revisions

Full Plugin Example

You can see a full plugin example at this link: https://github.com/willrees23/historyx-api-example

Installation



HistoryX's API is distributed through JitPack.

You will need to use Maven or Gradle to add the API as a dependency.

Maven

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

<dependency>
	<groupId>com.github.willrees23</groupId>
	<artifactId>historyx-api</artifactId>
	<version>{version}</version>
</dependency>

Gradle

dependencyResolutionManagement {
	repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
	repositories {
		mavenCentral()
		maven { url 'https://jitpack.io' }
	}
}

dependencies {
	implementation 'com.github.willrees23:historyx-api:{version}'
}

Editing plugin.yml

You need to make sure that your plugin depends on HistoryX.

You can do this by adding depends: [ HistoryX ] to your plugin.yml.

Here's a full example:

name: HistoryXAPI-Example
version: '1.0.0'
main: dev.wand.historyXAPIExample.HistoryXAPIExample
api-version: '1.13'
depends: [ HistoryX ]

Now you're ready to start using the API!

Clone this wiki locally