1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

Fix: Bedrock update notifications config option being ignored on Geyser-Fabric / Geyser-NeoForge

This commit is contained in:
onebeastchris
2025-09-25 19:26:35 +02:00
parent fe08932530
commit 61d7dc0a17
3 changed files with 15 additions and 6 deletions

View File

@@ -8,7 +8,10 @@ dependencies {
implementation(libs.cloud.bungee)
implementation(libs.adventure.text.serializer.bungeecord)
compileOnlyApi(libs.bungeecord.proxy)
compileOnlyApi(libs.bungeecord.proxy) {
isTransitive = false
}
compileOnlyApi(libs.bungeecord.api)
}
platformRelocate("net.md_5.bungee.jni")

View File

@@ -26,17 +26,21 @@
package org.geysermc.geyser.platform.mod;
import net.minecraft.server.level.ServerPlayer;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.Permissions;
import org.geysermc.geyser.platform.mod.command.ModCommandSource;
import org.geysermc.geyser.util.VersionCheckUtils;
public final class GeyserModUpdateListener {
public static void onPlayReady(ServerPlayer player) {
// Should be creating this in the supplier, but we need it for the permission check.
// Not a big deal currently because ModCommandSource doesn't load locale, so don't need to try to wait for it.
ModCommandSource source = new ModCommandSource(player.createCommandSourceStack());
if (source.hasPermission(Permissions.CHECK_UPDATE)) {
VersionCheckUtils.checkForGeyserUpdate(() -> source);
// We could just not register the listener, but, this allows config reloading
if (GeyserImpl.getInstance().getConfig().isNotifyOnNewBedrockUpdate()) {
// Should be creating this in the supplier, but we need it for the permission check.
// Not a big deal currently because ModCommandSource doesn't load locale, so don't need to try to wait for it.
ModCommandSource source = new ModCommandSource(player.createCommandSourceStack());
if (source.hasPermission(Permissions.CHECK_UPDATE)) {
VersionCheckUtils.checkForGeyserUpdate(() -> source);
}
}
}