mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
* feat: start database refactor Adds database migrations * refactor: refactor database system Now supports migrations * refactor: begin major internals rewrite move to using provider-style interfaces similar to huskclaims bukkit done, still need to do fabric and sponge * refactor: remove sponge, checkstyle Low usage and high maintenance time cost. We will examine Forge instead in the future. * refactor: implement refactoring changes on fabric also fix various refactor quirks on Bukkit * refactor: tidy metrics logic * build: bump deps
103 lines
4.7 KiB
Markdown
103 lines
4.7 KiB
Markdown
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](https://repo.william278.net/#/releases/net/william278/huskhomes/) and can be included in any Maven, Gradle, etc. project. JavaDocs are [available here](https://repo.william278.net/javadoc/releases/net/william278/huskhomes/latest).
|
|
|
|
## Compatibility
|
|
[](https://repo.william278.net/#/releases/net/william278/huskhomes/)
|
|
|
|
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_ | ❌ |
|
|
|
|
### Platforms
|
|
> **Note:** For versions older than `v4.6`, the HuskHomes API was only distributed for the Bukkit platform (as `net.william278:huskhomes`)
|
|
|
|
The HuskHomes API is available for the following platforms:
|
|
|
|
* `bukkit` - Bukkit, Spigot, Paper, etc. Provides Bukkit API event listeners and adapters to `org.bukkit` objects.
|
|
* `fabric` - Fabric, Quilt, etc. Provides Fabric API event callbacks and adapters to `net.minecraft` objects.
|
|
* `common` - Common API for all platforms.
|
|
|
|
<details>
|
|
<summary>Targeting older versions</summary>
|
|
|
|
* The HuskHomes API was only distributed for the Bukkit module prior to `v4.6`; the artifact ID was `net.william278:huskhomes` instead of `net.william278.huskhomes:huskhomes-PLATFORM`.
|
|
* HuskHomes versions prior to `v4.3.1` are distributed on [JitPack](https://jitpack.io/#net.william278/HuskHomes2), and you will need to use the `https://jitpack.io` repository instead.
|
|
</details>
|
|
|
|
## Table of contents
|
|
1. [API Introduction](#1-api-introduction)
|
|
1. [Setup with Maven](#11-setup-with-maven)
|
|
2. [Setup with Gradle](#12-setup-with-gradle)
|
|
2. [Adding HuskHomes as a dependency](#2-adding-huskhomes-as-a-dependency)
|
|
3. [Next steps](#3-next-steps)
|
|
|
|
## 1 API Introduction
|
|
### 1.1 Setup with Maven
|
|
<details>
|
|
<summary>Maven setup information</summary>
|
|
|
|
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).
|
|
```xml
|
|
<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): . Note for Fabric you must append the target Minecraft version to the version number (e.g. `3.6.1+1.20.1`).
|
|
```xml
|
|
<dependency>
|
|
<groupId>net.william278.huskhomes</groupId>
|
|
<artifactId>huskhomes-PLATFORM</artifactId>
|
|
<version>VERSION</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
```
|
|
</details>
|
|
|
|
### 1.2 Setup with Gradle
|
|
<details>
|
|
<summary>Gradle setup information</summary>
|
|
|
|
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).
|
|
```groovy
|
|
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): . Note for Fabric you must append the target Minecraft version to the version number (e.g. `3.6.1+1.20.1`).
|
|
|
|
```groovy
|
|
dependencies {
|
|
compileOnly 'net.william278.huskhomes:huskhomes-PLATFORM:VERSION'
|
|
}
|
|
```
|
|
</details>
|
|
|
|
## 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.
|
|
|
|
```yaml
|
|
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!
|
|
- [[API Examples]]
|
|
- [[API Events]]
|