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

+7 -5
View File
@@ -7,7 +7,7 @@ dependencies {
implementation 'me.lucko:commodore:2.2'
implementation 'net.kyori:adventure-platform-bukkit:4.3.2'
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:24.1.0'
compileOnly 'de.themoep:minedown-adventure:1.7.2-SNAPSHOT'
compileOnly 'net.william278:annotaml:2.0.5'
@@ -18,13 +18,13 @@ dependencies {
exclude group: 'org.spigotmc', module: 'spigot-api'
}
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:1.5.2'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.17:1.13.0'
testImplementation 'de.themoep:minedown-adventure:1.7.2-SNAPSHOT'
testImplementation 'net.kyori:adventure-platform-bukkit:4.3.2'
testImplementation 'org.apache.commons:commons-text:1.11.0'
testImplementation 'redis.clients:jedis:' + jedis_version
testImplementation 'org.xerial:sqlite-jdbc:' + sqlite_driver_version
testImplementation 'com.mysql:mysql-connector-j:' + mysql_driver_version
testImplementation "redis.clients:jedis:${jedis_version}"
testImplementation "org.xerial:sqlite-jdbc:${sqlite_driver_version}"
testImplementation "com.mysql:mysql-connector-j:${mysql_driver_version}"
}
shadowJar {
@@ -50,4 +50,6 @@ shadowJar {
relocate 'io.papermc.lib', 'net.william278.huskhomes.libraries.paperlib'
relocate 'space.arim.morepaperlib', 'net.william278.huskhomes.libraries.paperlib'
relocate 'me.lucko.commodore', 'net.william278.huskhomes.libraries.commodore'
minimize()
}
@@ -230,6 +230,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
@Override
public void onDisable() {
HuskHomesAPI.unregister();
if (this.eventListener != null) {
this.eventListener.handlePluginDisable();
}
@@ -483,11 +484,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
}
}
@NotNull
public AudienceProvider getAudiences() {
return audiences;
}
@NotNull
public GracefulScheduling getScheduler() {
return paperLib.scheduling();
@@ -43,9 +43,6 @@ import java.util.Objects;
@SuppressWarnings("unused")
public class HuskHomesAPI extends BaseHuskHomesAPI {
// Instance of the plugin
private static HuskHomesAPI instance;
/**
* <b>(Internal use only)</b> - Constructor, instantiating the API.
*/
@@ -62,10 +59,7 @@ public class HuskHomesAPI extends BaseHuskHomesAPI {
*/
@NotNull
public static HuskHomesAPI getInstance() throws NotRegisteredException {
if (instance == null) {
throw new NotRegisteredException();
}
return instance;
return (HuskHomesAPI) BaseHuskHomesAPI.getInstance();
}
/**
@@ -78,14 +72,6 @@ public class HuskHomesAPI extends BaseHuskHomesAPI {
instance = new HuskHomesAPI(plugin);
}
/**
* <b>(Internal use only)</b> - Unregister the API for this platform.
*/
@ApiStatus.Internal
public static void unregister() {
instance = null;
}
/**
* Returns an {@link OnlineUser} instance for the given bukkit {@link Player}.
*
+1 -1
View File
@@ -4,7 +4,7 @@ author: 'William278'
website: 'https://william278.net/'
main: 'net.william278.huskhomes.BukkitHuskHomes'
version: '${version}'
api-version: '1.16'
api-version: '1.17'
softdepend:
- Vault
- PlaceholderAPI
@@ -48,9 +48,9 @@ import java.util.Optional;
import java.util.stream.Stream;
/**
* Uses MockBukkit to test the plugin on a mock Paper server implementing the Bukkit 1.16 API.
* Uses MockBukkit to test the plugin on a mock Paper server implementing the Bukkit 1.17 API.
*/
@DisplayName("Bukkit Plugin Tests (1.16.5)")
@DisplayName("Bukkit Plugin Tests (1.17.1)")
public class BukkitPluginTests {
private static ServerMock server;