Skip to content

Commit

Permalink
Merge branch 'GeyserMC:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens-Co authored Sep 20, 2023
2 parents 63a72a4 + 492be77 commit 82e0381
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
6 changes: 3 additions & 3 deletions build-logic/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -220,6 +223,8 @@ public PlayerLink load() {
@Subscribe
public void onShutdown(ShutdownEvent ignored) throws Exception {
instance.stop();
classLoader.close();
if (classLoader != null) {
classLoader.close();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public class ClassNames {
}

IS_FOLIA = ReflectionUtils.getClassSilently(
"io.papermc.paper.threadedregions.scheduler.EntityScheduler"
"io.papermc.paper.threadedregions.RegionizedServer"
) != null;
}

Expand Down

0 comments on commit 82e0381

Please sign in to comment.