Api
The HuskHomes API provides methods for getting, editing and updating user homes and warps, as well as functionality for building and executing (cross-server) teleports.
The API is distributed on Maven through repo.william278.net and can be included in any Maven, Gradle, etc. project. JavaDocs are available here.
Compatibility
The HuskHomes API shares version numbering with the plugin itself for consistency and convenience. Please note minor and patch plugin releases may make API additions and deprecations, but will not introduce breaking changes without notice.
API Version | HuskHomes Versions | Supported |
---|---|---|
v4.x | v4.0—Current | ✅ |
v3.x | v3.0—v3.2.1 | ❌ |
v2.x | v2.0—v2.11.2 | ❌ |
v1.x | v1.5—v1.5.11 | ❌ |
Targeting older versions
HuskHomes versions prior to v4.3.1
are distributed on JitPack, and you will need to use the https://jitpack.io
repository instead.
Table of contents
- Adding the API to your project
- Adding HuskHomes as a dependency
- Next steps
API Introduction
1.1 Setup with Maven
Maven setup information
Add the repository to your pom.xml
as per below. You can alternatively specify /snapshots
for the repository containing the latest development builds (not recommended).
<repositories>
<repository>
<id>william278.net</id>
<url>https://repo.william278.net/releases</url>
</repository>
</repositories>
Add the dependency to your pom.xml
as per below. Replace VERSION
with the latest version of HuskHomes (without the v):
<dependency>
<groupId>net.william278</groupId>
<artifactId>huskhomes</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
1.2 Setup with Gradle
Gradle setup information
Add the dependency as per below to your build.gradle
. You can alternatively specify /snapshots
for the repository containing the latest development builds (not recommended).
allprojects {
repositories {
maven { url 'https://repo.william278.net/releases' }
}
}
Add the dependency as per below. Replace VERSION
with the latest version of HuskHomes (without the v):
dependencies {
compileOnly 'net.william278:huskhomes:VERSION'
}
2. Adding HuskHomes as a dependency
Add HuskHomes to your softdepend
(if you want to optionally use HuskHomes) or depend
(if your plugin relies on HuskHomes) section in plugin.yml
of your project.
name: MyPlugin
version: 1.0
main: net.william278.myplugin.MyPlugin
author: William278
description: 'A plugin that hooks with the HuskHomes API!'
softdepend: # Or, use 'depend' here
- HuskHomes
3. Next steps
Now that you've got everything ready, you can start doing stuff with the HuskHomes API!