From b47abe2d0495868d7f7571be7d8a674abd6bf2b2 Mon Sep 17 00:00:00 2001 From: Konicai <71294714+konicai@users.noreply.github.com> Date: Mon, 22 May 2023 21:45:35 -0400 Subject: [PATCH] Remove usage of GeyserConnector --- pom.xml | 6 +++--- .../projectg/geyserupdater/velocity/VelocityUpdater.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index f3151bd5..f418192f 100644 --- a/pom.xml +++ b/pom.xml @@ -22,8 +22,8 @@ https://oss.sonatype.org/content/repositories/snapshots - velocity - https://nexus.velocitypowered.com/repository/maven-public/ + papermc + https://repo.papermc.io/repository/maven-public/ spigot-repo @@ -49,7 +49,7 @@ com.velocitypowered velocity-api - 3.1.0 + 3.1.1 provided diff --git a/src/main/java/com/projectg/geyserupdater/velocity/VelocityUpdater.java b/src/main/java/com/projectg/geyserupdater/velocity/VelocityUpdater.java index 2af47648..d9ca5f4a 100644 --- a/src/main/java/com/projectg/geyserupdater/velocity/VelocityUpdater.java +++ b/src/main/java/com/projectg/geyserupdater/velocity/VelocityUpdater.java @@ -14,7 +14,7 @@ import com.moandjiezana.toml.Toml; -import org.geysermc.connector.GeyserConnector; +import org.geysermc.geyser.GeyserImpl; import org.slf4j.Logger; import com.velocitypowered.api.event.PostOrder; @@ -100,8 +100,8 @@ public void onProxyInitialization(ProxyInitializeEvent event) { @Subscribe(order = PostOrder.LAST) public void onShutdown(ProxyShutdownEvent event) { - // This test isn't ideal but it'll work for now - if (!GeyserConnector.getInstance().getBedrockServer().isClosed()) { + // todo: listen for GeyserShutdownEvent instead + if (!GeyserImpl.getInstance().isShuttingDown()) { throw new UnsupportedOperationException("Cannot shutdown GeyserUpdater before Geyser has shutdown! No updates will be applied."); } try {