diff --git a/common/build.gradle b/common/build.gradle index f5d281b51..3ef159bcd 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -66,7 +66,7 @@ dependencies { api 'com.github.ben-manes.caffeine:caffeine:2.9.0' api 'com.squareup.okhttp3:okhttp:3.14.9' api 'com.squareup.okio:okio:1.17.5' - api 'net.bytebuddy:byte-buddy:1.10.22' + api 'net.bytebuddy:byte-buddy:1.14.17' api('org.spongepowered:configurate-core:3.7.2') { transitive = false diff --git a/minestom/build.gradle b/minestom/build.gradle index 6709a37f5..b174a4b56 100644 --- a/minestom/build.gradle +++ b/minestom/build.gradle @@ -4,9 +4,9 @@ plugins { id "java-library" } -// minestom requires java 17+ -sourceCompatibility = 17 -targetCompatibility = 17 +// minestom requires java 21+ +sourceCompatibility = 21 +targetCompatibility = 21 repositories { mavenCentral() @@ -21,11 +21,11 @@ dependencies { exclude group: "org.spongepowered", module: "configurate-hocon" exclude group: "me.lucko.configurate", module: "configurate-toml" } - compileOnlyApi("net.minestom:minestom-snapshots:fe46ed4ac2") + compileOnlyApi("net.minestom:minestom-snapshots:1_20_5-b04ef5189f") // testing testImplementation project(":common") - testImplementation "net.minestom:minestom-snapshots:fe46ed4ac2" + testImplementation "net.minestom:minestom-snapshots:1_20_5-b04ef5189f" testImplementation "commons-net:commons-net:3.10.0" // fix vulnerability in minestom testImplementation "ch.qos.logback:logback-classic:1.4.14" // logger testImplementation "org.spongepowered:configurate-hocon:3.7.2" // configuration using hocon diff --git a/minestom/src/main/java/me/lucko/luckperms/minestom/context/defaults/DimensionTypeContextProvider.java b/minestom/src/main/java/me/lucko/luckperms/minestom/context/defaults/DimensionTypeContextProvider.java index 5cab1329e..91ffb09ed 100644 --- a/minestom/src/main/java/me/lucko/luckperms/minestom/context/defaults/DimensionTypeContextProvider.java +++ b/minestom/src/main/java/me/lucko/luckperms/minestom/context/defaults/DimensionTypeContextProvider.java @@ -12,8 +12,6 @@ import net.minestom.server.event.EventNode; import net.minestom.server.event.player.PlayerSpawnEvent; import net.minestom.server.instance.Instance; -import net.minestom.server.utils.NamespaceID; -import net.minestom.server.world.DimensionType; import org.checkerframework.checker.nullness.qual.NonNull; import org.jetbrains.annotations.NotNull; @@ -27,16 +25,13 @@ public final class DimensionTypeContextProvider implements ContextProvider { @Override public @NotNull Optional query(@NotNull Player subject) { return Optional.ofNullable(subject.getInstance()) - .map(Instance::getDimensionType) - .map(DimensionType::getName) - .map(NamespaceID::value); + .map(Instance::getDimensionName); } @Override public @NotNull Set potentialValues() { - return MinecraftServer.getDimensionTypeManager().unmodifiableList().stream() - .map(DimensionType::getName) - .map(NamespaceID::value) + return MinecraftServer.getDimensionTypeRegistry().values().stream() + .map((d) -> d.namespace().value()) .collect(Collectors.toSet()); }