diff --git a/Cargo.lock b/Cargo.lock index d47ca4e..6a892f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3999,7 +3999,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scopenet-core" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "base64 0.22.1", @@ -4021,7 +4021,7 @@ dependencies = [ [[package]] name = "scopenet-launcher" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "base64 0.22.1", @@ -4047,7 +4047,7 @@ dependencies = [ [[package]] name = "scopenet-panel" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "argon2", @@ -4083,7 +4083,7 @@ dependencies = [ [[package]] name = "scopenet-shared" -version = "0.4.0" +version = "0.5.0" dependencies = [ "md-5", "serde", diff --git a/Cargo.toml b/Cargo.toml index b8c133c..f723f6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/shared", "crates/core", "panel/server", "launcher/src-tauri"] [workspace.package] -version = "0.4.0" +version = "0.5.0" edition = "2021" repository = "https://github.com/scopeddlol/SCOPENET-MC" diff --git a/integrations/bluemap/build.gradle b/integrations/bluemap/build.gradle index 6f68fc0..1d09c23 100644 --- a/integrations/bluemap/build.gradle +++ b/integrations/bluemap/build.gradle @@ -4,8 +4,13 @@ repositories { maven { url = 'https://repo.bluecolored.de/releases' } } +configurations.compileClasspath { + attributes { + attribute(org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21) + } +} dependencies { implementation project(':common') - compileOnly 'de.bluecolored.bluemap:BlueMapAPI:2.7.4' + compileOnly 'de.bluecolored:bluemap-api:2.7.4' implementation 'com.google.code.gson:gson:2.10.1' } diff --git a/integrations/build.gradle b/integrations/build.gradle index 34ead02..f278508 100644 --- a/integrations/build.gradle +++ b/integrations/build.gradle @@ -1,6 +1,6 @@ allprojects { group = 'net.scopenet' - version = providers.gradleProperty('releaseVersion').getOrElse('0.4.0') + version = providers.gradleProperty('releaseVersion').getOrElse('0.5.0') repositories { mavenCentral() } } subprojects { diff --git a/integrations/paper/build.gradle b/integrations/paper/build.gradle index 2fb22d7..ca2d36d 100644 --- a/integrations/paper/build.gradle +++ b/integrations/paper/build.gradle @@ -24,6 +24,6 @@ jar { from project(':common').sourceSets.main.output from project(':api').sourceSets.main.output from project(':bluemap').sourceSets.main.output - from { configurations.runtimeClasspath.findAll { it.name.endsWith('.jar') && !it.name.startsWith('common-') }.collect { zipTree(it) } } + from { configurations.runtimeClasspath.findAll { it.name.endsWith('.jar') && !it.name.startsWith('common-') && !it.name.startsWith('api-') && !it.name.startsWith('bluemap-') }.collect { zipTree(it) } } exclude 'META-INF/*.SF', 'META-INF/*.RSA', 'META-INF/*.DSA' } diff --git a/integrations/paper/src/main/java/net/scopenet/paper/ScopenetPlugin.java b/integrations/paper/src/main/java/net/scopenet/paper/ScopenetPlugin.java index 137a406..efd9c21 100644 --- a/integrations/paper/src/main/java/net/scopenet/paper/ScopenetPlugin.java +++ b/integrations/paper/src/main/java/net/scopenet/paper/ScopenetPlugin.java @@ -27,6 +27,7 @@ public final class ScopenetPlugin extends JavaPlugin implements Listener { private ClientLinkBridge clientLink; private EssentialsHandler essentialsHandler; private GuildHandler guildHandler; + private boolean liveMapStarted; @Override public void onEnable() { // Install the deny-by-default listener even if configuration is invalid. @@ -52,7 +53,9 @@ public final class ScopenetPlugin extends JavaPlugin implements Listener { // Central Live Map: mirror chunks and player positions to the panel. if (getConfig().getBoolean("livemap.enabled", true)) { - integration.enableLiveMap(Bukkit.getWorlds().get(0).getWorldFolder().toPath()); + // STARTUP plugins enable before Paper loads any worlds. WorldLoadEvent starts + // the map on a fresh boot; this also handles enabling after worlds exist. + for (World world : Bukkit.getWorlds()) startLiveMap(world); Bukkit.getScheduler().runTaskTimer(this, this::snapshotPlayers, 40, 20); } @@ -118,11 +121,23 @@ public final class ScopenetPlugin extends JavaPlugin implements Listener { getLogger().info(" - Essentials: " + (settings.essentialsEnabled() ? "ENABLED" : "DISABLED")); getLogger().info(" - Economy: " + (settings.economyEnabled() ? "ENABLED" : "DISABLED")); } catch (Exception e) { - getLogger().severe("SCOPENET is blocking joins: " + e.getMessage()); + getLogger().log(java.util.logging.Level.SEVERE, "SCOPENET is blocking joins", e); for (Player player : Bukkit.getOnlinePlayers()) player.kickPlayer(Integration.UNAVAILABLE); } } + @EventHandler + public void worldLoaded(org.bukkit.event.world.WorldLoadEvent event) { + startLiveMap(event.getWorld()); + } + + private void startLiveMap(World world) { + if (liveMapStarted || integration == null || world.getEnvironment() != World.Environment.NORMAL + || !getConfig().getBoolean("livemap.enabled", true)) return; + integration.enableLiveMap(world.getWorldFolder().toPath()); + liveMapStarted = true; + } + private Settings readSettings() { return Settings.of( getConfig().getString("panel-url", ""), diff --git a/launcher/package.json b/launcher/package.json index 0d19fee..543a132 100644 --- a/launcher/package.json +++ b/launcher/package.json @@ -1,7 +1,7 @@ { "name": "scopenet-launcher", "private": true, - "version": "0.4.0", + "version": "0.5.0", "type": "module", "scripts": { "dev": "vite", diff --git a/launcher/src-tauri/src/state.rs b/launcher/src-tauri/src/state.rs index 46bd7c0..8a77960 100644 --- a/launcher/src-tauri/src/state.rs +++ b/launcher/src-tauri/src/state.rs @@ -10,9 +10,15 @@ use std::sync::{Mutex, RwLock}; /// Values baked in at build time by CI (see `.github/workflows/release.yml`). pub mod build { /// Default panel URL for this build. - pub const PANEL_URL: Option<&str> = option_env!("SCOPENET_PANEL_URL"); + pub const PANEL_URL: Option<&str> = match option_env!("SCOPENET_PANEL_URL") { + Some(u) if !u.is_empty() => Some(u), + _ => Some("https://scopenetmcpanel.scopedd.lol"), + }; /// `owner/repo` used to check GitHub releases for updates. - pub const REPO: Option<&str> = option_env!("SCOPENET_REPO"); + pub const REPO: Option<&str> = match option_env!("SCOPENET_REPO") { + Some(r) if !r.is_empty() => Some(r), + _ => Some("scopeddlol/SCOPENET-MC"), + }; /// When set to "1", players can't change the panel URL. pub const LOCK_PANEL: Option<&str> = option_env!("SCOPENET_LOCK_PANEL"); diff --git a/launcher/src-tauri/tauri.conf.json b/launcher/src-tauri/tauri.conf.json index c8188d2..6c86452 100644 --- a/launcher/src-tauri/tauri.conf.json +++ b/launcher/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "SCOPENET Launcher", - "version": "0.4.0", + "version": "0.5.0", "identifier": "net.scopenet.launcher", "build": { "beforeDevCommand": "npm run dev", diff --git a/launcher/src/lib/store.svelte.ts b/launcher/src/lib/store.svelte.ts index aeb3f4d..a0c3d6a 100644 --- a/launcher/src/lib/store.svelte.ts +++ b/launcher/src/lib/store.svelte.ts @@ -90,9 +90,17 @@ export async function init() { theme(); pickSelected(); subscribe(); - app.ready = true; invoke('show_window').catch(() => {}); - if (app.panelUrl) await refresh(); + if (app.panelUrl && !app.manifest) { + try { + await refresh(); + } finally { + app.ready = true; + } + } else { + app.ready = true; + if (app.panelUrl) await refresh(); + } if (boot.settings.check_updates && boot.app.repo) { invoke('check_update').then((u) => (app.update = u)).catch(() => {}); } diff --git a/panel/web/package.json b/panel/web/package.json index f7a90f6..f8b44cb 100644 --- a/panel/web/package.json +++ b/panel/web/package.json @@ -1,7 +1,7 @@ { "name": "scopenet-panel-web", "private": true, - "version": "0.4.0", + "version": "0.5.0", "type": "module", "scripts": { "dev": "vite", diff --git a/release-artifacts/0.5.0/SCOPENET Launcher_0.5.0_x64-setup.exe b/release-artifacts/0.5.0/SCOPENET Launcher_0.5.0_x64-setup.exe new file mode 100644 index 0000000..530fab3 Binary files /dev/null and b/release-artifacts/0.5.0/SCOPENET Launcher_0.5.0_x64-setup.exe differ diff --git a/release-artifacts/0.5.0/SHA256SUMS b/release-artifacts/0.5.0/SHA256SUMS new file mode 100644 index 0000000..dd94b7e --- /dev/null +++ b/release-artifacts/0.5.0/SHA256SUMS @@ -0,0 +1,9 @@ +5e931abbb8b037c8de349afdd0b4165c23059e58672f7e0a11a27c4f70db6bed scopenet-client-fabric-1.20.1-0.5.0.jar +cb8690f842f0efb7a336c568a12e11c5bc9da2986ab68f337d4ca211c99cecb5 scopenet-fabric-1.20.1-0.5.0.jar +e1e6650e05f5a66655f88be8e892095e79ddf8cd5502affea9bd68033e33cc21 scopenet-fabric-1.21.1-0.5.0.jar +a54a1478c0740eb4aef20797037738355e3482ac1f4eaaa9b408d16e2303b7ed scopenet-fabric-26.3-0.5.0.jar +d9a22725d0b2554f31e010a6f596a73c023b339490ef982b5d53e8f866a8c447 scopenet-forge-1.20.1-0.5.0.jar +49098a90919fdea02f4eec26e332cd6a51fc7bb398ba1d55f87528f52610e250 scopenet-forge-1.21.1-0.5.0.jar +31e5076947f33ad1ec0037d92736b28eb8a47e4be84a6bacbf1dfd11308f579a scopenet-forge-26.3-0.5.0.jar +4963fad47421c8c4c9ff96cfa44fd808a5ecda2da1c2b08b0c18c43eaef5cb1c scopenet-paper-0.5.0.jar +3ade714b0869b9fbb0e6175280b69d5bb6531543ce8ce48c7f231f170081dd5f SCOPENET Launcher_0.5.0_x64-setup.exe diff --git a/release-artifacts/0.5.0/scopenet-client-fabric-1.20.1-0.5.0.jar b/release-artifacts/0.5.0/scopenet-client-fabric-1.20.1-0.5.0.jar new file mode 100644 index 0000000..990a3fd Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-client-fabric-1.20.1-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-fabric-1.20.1-0.5.0.jar b/release-artifacts/0.5.0/scopenet-fabric-1.20.1-0.5.0.jar new file mode 100644 index 0000000..0d04cee Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-fabric-1.20.1-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-fabric-1.21.1-0.5.0.jar b/release-artifacts/0.5.0/scopenet-fabric-1.21.1-0.5.0.jar new file mode 100644 index 0000000..ffb095d Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-fabric-1.21.1-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-fabric-26.3-0.5.0.jar b/release-artifacts/0.5.0/scopenet-fabric-26.3-0.5.0.jar new file mode 100644 index 0000000..324e6c5 Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-fabric-26.3-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-forge-1.20.1-0.5.0.jar b/release-artifacts/0.5.0/scopenet-forge-1.20.1-0.5.0.jar new file mode 100644 index 0000000..ddf312e Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-forge-1.20.1-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-forge-1.21.1-0.5.0.jar b/release-artifacts/0.5.0/scopenet-forge-1.21.1-0.5.0.jar new file mode 100644 index 0000000..a58f608 Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-forge-1.21.1-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-forge-26.3-0.5.0.jar b/release-artifacts/0.5.0/scopenet-forge-26.3-0.5.0.jar new file mode 100644 index 0000000..1dbc666 Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-forge-26.3-0.5.0.jar differ diff --git a/release-artifacts/0.5.0/scopenet-paper-0.5.0.jar b/release-artifacts/0.5.0/scopenet-paper-0.5.0.jar new file mode 100644 index 0000000..b2b226c Binary files /dev/null and b/release-artifacts/0.5.0/scopenet-paper-0.5.0.jar differ