refactor: Fabric 1.20.4, Sponge API v10, Java 17, Platform APIs (#562)

* deps: bump dependencies

* refactor: bukkit 1.17.1, Sponge v10, fabric 1.20.4

* refactor: release platform-specific API modules

* fix: checkstyle javadoc comment

* docs: update API docs

* docs: mention API platforms in events api docs
This commit is contained in:
William authored and GitHub committed 2024-02-12 11:18:50 +00:00
1 parent c0e079c46c
commit f8ad215b76
24 files changed
+227 -159

No files matched your search

+2
View File
@@ -24,6 +24,8 @@ HuskHomes provides a number of API events your plugin can listen to when certain
‡ Called on the server the player *is teleported from*; not necessarily where the executor of the teleport is.
## Events on Sponge & Fabric
> **Note:** Check the [[API]] introduction for details on targeting platforms
Sponge, which has a similar Event api as Bukkit, has equivalent events for all of the above, prefixed with `Sponge` (so HomeCreateEvent on Bukkit is SpongeHomeCreateEvent on Sponge).
Fabric uses callbacks for handling events. HuskHomes provides callback equivalents for all the above events. For instance, to handle what to do when someone creates a home, you can register a callback to handle what to do as follows:
+24 -9
View File
@@ -3,7 +3,7 @@ The HuskHomes API provides methods for getting, editing and updating user homes
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
[![Maven](https://repo.william278.net/api/badge/latest/releases/net/william278/huskhomes?color=00fb9a&name=Maven&prefix=v)](https://repo.william278.net/#/releases/net/william278/huskhomes/)
[![Maven](https://repo.william278.net/api/badge/latest/releases/net/william278/huskhomes/huskhomes-common?color=00fb9a&name=Maven&prefix=v)](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.
@@ -14,18 +14,33 @@ The HuskHomes API shares version numbering with the plugin itself for consistenc
| 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 events and extends `BaseHuskHomesAPI` with `org.bukkit` adapters.
* `fabric` - Fabric, Quilt, etc. Provides Fabric callback-style listeners
* `sponge` - Sponge. Provides Sponge API events.
* `common` - Common API for all platforms.
<details>
<summary>Targeting older versions</summary>
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.
* 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. Adding the API to your project
2. Adding HuskHomes as a dependency
3. Next steps
1. [API Introduction](#1-api-introduction)
1. [Setup with Maven](#11-setup-with-maven)
2. [Setup with Gradle](#12-setup-with-gradle)
3. [Next steps](#3-next-steps)
2. [Adding HuskHomes as a dependency](#2-adding-huskhomes-as-a-dependency)
3. [Next steps](#3-next-steps)
## 1 API Introduction
## API Introduction
### 1.1 Setup with Maven
<details>
<summary>Maven setup information</summary>
@@ -42,8 +57,8 @@ Add the repository to your `pom.xml` as per below. You can alternatively specify
Add the dependency to your `pom.xml` as per below. Replace `VERSION` with the latest version of HuskHomes (without the v): ![Latest version](https://img.shields.io/github/v/tag/WiIIiam278/HuskHomes?color=%23282828&label=%20&style=flat-square)
```xml
<dependency>
<groupId>net.william278</groupId>
<artifactId>huskhomes</artifactId>
<groupId>net.william278.huskhomes</groupId>
<artifactId>huskhomes-PLATFORM</artifactId>
<version>VERSION</version>
<scope>provided</scope>
</dependency>
@@ -66,7 +81,7 @@ Add the dependency as per below. Replace `VERSION` with the latest version of Hu
```groovy
dependencies {
compileOnly 'net.william278:huskhomes:VERSION'
compileOnly 'net.william278.huskhomes:huskhomes-PLATFORM:VERSION'
}
```
</details>
+2 -2
View File
@@ -3,13 +3,13 @@ This will walk you through installing HuskHomes on your Spigot, Fabric or Sponge
## Requirements
> **Note:** If the plugin fails to load, please check that you are not running an [incompatible version combination](Unsupported-Versions)
* A Spigot (1.16.5+), Fabric (latest Minecraft version), or Sponge (Implementing API v8) _Minecraft: Java Edition_ server running on Java 16+
* A Spigot (1.17.1+), Fabric (latest Minecraft version), or Sponge (Implementing API v10) _Minecraft: Java Edition_ server running on Java 17+
* (For proxy network support) A proxy server (Velocity, BungeeCord) and MySQL (v8.0+)/MariaDB database
* (For optional [[Redis support]]) A Redis database (v5.0+)
## Download HuskHomes for your server
Download the correct jar file for your server from the [latest release page](https://github.com/WiIIiam278/HuskHomes/releases/latest):
* the `HuskHomes-Plugin` jar for Spigot or Paper servers
* the `HuskHomes-Paper` jar for Spigot or Paper servers
* the `HuskHomes-Fabric` jar for Fabric servers
* or the `HuskHomes-Sponge` jar for Sponge servers
+1
View File
@@ -5,6 +5,7 @@ This plugin does not support the following software-Minecraft version combinatio
|--------------------|-------------------------------------------|----------------------------------------|
| 1.19.4 | Only: `Purpur, Pufferfish`&dagger; | Older Paper builds also not supported. |
| 1.19.3 | Only: `Paper, Purpur, Pufferfish`&dagger; | Upgrade to 1.19.4 or use Spigot |
| 1.16.5 | _All_ | Use HuskHomes 4.5.5 |
| below 1.16.5 | _All_ | Upgrade to 1.16.5 |
&dagger;Further downstream forks of this server software are also affected.