mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
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:
1 parent
c0e079c46c
commit
f8ad215b76
24 files changed
+227
-159
No files matched your search
@@ -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}.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user