diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 09fb2163..4418b61a 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -1,5 +1,5 @@ dependencies { - api("org.geysermc", "common", Versions.geyserVersion) + api("org.geysermc.geyser", "common", Versions.geyserVersion) api("org.geysermc.cumulus", "cumulus", Versions.cumulusVersion) api("org.geysermc.event", "events", Versions.eventsVersion) diff --git a/build-logic/src/main/kotlin/Versions.kt b/build-logic/src/main/kotlin/Versions.kt index a7d5d0ff..139a3ef5 100644 --- a/build-logic/src/main/kotlin/Versions.kt +++ b/build-logic/src/main/kotlin/Versions.kt @@ -24,9 +24,9 @@ */ object Versions { - const val geyserVersion = "2.0.7-SNAPSHOT" - const val cumulusVersion = "1.1.1" - const val eventsVersion = "1.0-SNAPSHOT" + const val geyserVersion = "2.1.2-SNAPSHOT" + const val cumulusVersion = "1.1.2" + const val eventsVersion = "1.1-SNAPSHOT" const val configUtilsVersion = "1.0-SNAPSHOT" const val spigotVersion = "1.19.4-R0.1-SNAPSHOT" const val fastutilVersion = "8.5.3" diff --git a/core/src/main/java/org/geysermc/floodgate/link/PlayerLinkHolder.java b/core/src/main/java/org/geysermc/floodgate/link/PlayerLinkHolder.java index a91ba679..4b140c2f 100644 --- a/core/src/main/java/org/geysermc/floodgate/link/PlayerLinkHolder.java +++ b/core/src/main/java/org/geysermc/floodgate/link/PlayerLinkHolder.java @@ -71,12 +71,15 @@ public final class PlayerLinkHolder { private URLClassLoader classLoader; private PlayerLink instance; - @NonNull - public PlayerLink load() { + public @NonNull PlayerLink load() { if (instance != null) { return instance; } + instance = load0(); + return instance; + } + private @NonNull PlayerLink load0() { if (config == null) { throw new IllegalStateException("Config cannot be null!"); } @@ -189,7 +192,7 @@ public PlayerLink load() { }); injectorHolder.set(linkInjector); - instance = linkInjector.getInstance(mainClass); + PlayerLink instance = linkInjector.getInstance(mainClass); // we use our own internal PlayerLinking when global linking is enabled if (linkConfig.isEnableGlobalLinking()) { @@ -220,6 +223,8 @@ public PlayerLink load() { @Subscribe public void onShutdown(ShutdownEvent ignored) throws Exception { instance.stop(); - classLoader.close(); + if (classLoader != null) { + classLoader.close(); + } } } diff --git a/spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java b/spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java index 364eb7e7..11f757f1 100644 --- a/spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java +++ b/spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java @@ -227,7 +227,7 @@ public class ClassNames { } IS_FOLIA = ReflectionUtils.getClassSilently( - "io.papermc.paper.threadedregions.scheduler.EntityScheduler" + "io.papermc.paper.threadedregions.RegionizedServer" ) != null; }