From 63523d712be7b15fb70f719c532b1ddaf5d793d0 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Thu, 23 May 2024 20:22:40 +0200 Subject: [PATCH] Made it build --- .../connection/ConnectionRequestEvent.java | 26 ++++++++++++++++++- bootstrap/mod/fabric/build.gradle.kts | 1 - bootstrap/mod/neoforge/build.gradle.kts | 1 - .../geyser.modded-conventions.gradle.kts | 2 +- .../geyser/network/netty/GeyserServer.java | 2 +- .../geyser/session/GeyserSession.java | 1 - gradle/libs.versions.toml | 6 ++--- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/api/src/main/java/org/geysermc/geyser/api/event/connection/ConnectionRequestEvent.java b/api/src/main/java/org/geysermc/geyser/api/event/connection/ConnectionRequestEvent.java index 5c1f4ef51..c7b8284ef 100644 --- a/api/src/main/java/org/geysermc/geyser/api/event/connection/ConnectionRequestEvent.java +++ b/api/src/main/java/org/geysermc/geyser/api/event/connection/ConnectionRequestEvent.java @@ -72,7 +72,7 @@ public final class ConnectionRequestEvent implements Event, Cancellable { * @return the cancel status of this event */ @Override - public boolean isCancelled() { + public boolean cancelled() { return cancelled; } @@ -82,6 +82,30 @@ public final class ConnectionRequestEvent implements Event, Cancellable { * @param cancelled the cancel status of this event. */ @Override + public void cancelled(boolean cancelled) { + this.cancelled = cancelled; + } + + /** + * The cancel status of this event. If this event is cancelled, the connection will be rejected. + * + * @return the cancel status of this event + * @deprecated use {@link #cancelled()} instead + */ + @Override + @Deprecated(forRemoval = true) + public boolean isCancelled() { + return cancelled; + } + + /** + * Sets the cancel status of this event. If this event is canceled, the connection will be rejected. + * + * @param cancelled the cancel status of this event. + * @deprecated use {@link #cancelled(boolean)} instead + */ + @Override + @Deprecated(forRemoval = true) public void setCancelled(boolean cancelled) { this.cancelled = cancelled; } diff --git a/bootstrap/mod/fabric/build.gradle.kts b/bootstrap/mod/fabric/build.gradle.kts index cd513c1e4..3880db895 100644 --- a/bootstrap/mod/fabric/build.gradle.kts +++ b/bootstrap/mod/fabric/build.gradle.kts @@ -36,7 +36,6 @@ dependencies { // Let's shade in our own api/common module shadow(projects.api) { isTransitive = false } - shadow(projects.common) { isTransitive = false } // Permissions modImplementation(libs.fabric.permissions) diff --git a/bootstrap/mod/neoforge/build.gradle.kts b/bootstrap/mod/neoforge/build.gradle.kts index ff77bcc5c..f7204332b 100644 --- a/bootstrap/mod/neoforge/build.gradle.kts +++ b/bootstrap/mod/neoforge/build.gradle.kts @@ -31,7 +31,6 @@ dependencies { // Let's shade in our own api shadow(projects.api) { isTransitive = false } - shadow(projects.common) { isTransitive = false } // Include all transitive deps of core via JiJ includeTransitive(projects.core) diff --git a/build-logic/src/main/kotlin/geyser.modded-conventions.gradle.kts b/build-logic/src/main/kotlin/geyser.modded-conventions.gradle.kts index b75e9c5be..e8bd602d3 100644 --- a/build-logic/src/main/kotlin/geyser.modded-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/geyser.modded-conventions.gradle.kts @@ -115,7 +115,7 @@ dependencies { } repositories { - // mavenLocal() + mavenLocal() maven("https://repo.opencollab.dev/maven-releases/") maven("https://repo.opencollab.dev/maven-snapshots/") maven("https://jitpack.io") diff --git a/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java b/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java index a67bd8a32..c2afc2ae2 100644 --- a/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java +++ b/core/src/main/java/org/geysermc/geyser/network/netty/GeyserServer.java @@ -275,7 +275,7 @@ public final class GeyserServer { this.proxiedAddresses != null ? this.proxiedAddresses.get(inetSocketAddress) : null ); geyser.eventBus().fire(requestEvent); - if (requestEvent.isCancelled()) { + if (requestEvent.cancelled()) { geyser.getLogger().debug("Connection request from " + ip + " was cancelled using the API!"); connectionAttempts++; return false; diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index 7f5915ea9..8ff91202f 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -138,7 +138,6 @@ import org.geysermc.geyser.registry.type.ItemMappings; import org.geysermc.geyser.session.auth.AuthData; import org.geysermc.geyser.session.auth.BedrockClientData; import org.geysermc.geyser.session.cache.*; -import org.geysermc.geyser.skin.FloodgateSkinUploader; import org.geysermc.geyser.text.GeyserLocale; import org.geysermc.geyser.text.MinecraftLocale; import org.geysermc.geyser.translator.inventory.InventoryTranslator; diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 092bcd332..67eb5d91d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] base-api = "feature-floodgate-merge-1.1.0-SNAPSHOT" -floodgate = "development-2.2.2-SNAPSHOT" +floodgate = "development-3.0.0-SNAPSHOT" cumulus = "1.1.2" erosion = "1.0-20230406.174837-8" events = "1.1-SNAPSHOT" @@ -28,7 +28,7 @@ folia = "1.19.4-R0.1-SNAPSHOT" viaversion = "4.9.2" adapters = "1.12-SNAPSHOT" commodore = "2.2" -bungeecord = "a7c6ede" +bungeecord = "1.20-R0.3-SNAPSHOT" velocity = "3.3.0-SNAPSHOT" viaproxy = "3.2.1" fabric-minecraft = "1.20.5" @@ -108,7 +108,7 @@ neoforge-minecraft = { group = "net.neoforged", name = "neoforge", version.ref = adapters-spigot = { group = "org.geysermc.geyser.adapters", name = "spigot-all", version.ref = "adapters" } adapters-paper = { group = "org.geysermc.geyser.adapters", name = "paper-all", version.ref = "adapters" } -bungeecord-proxy = { group = "com.github.SpigotMC.BungeeCord", name = "bungeecord-proxy", version.ref = "bungeecord" } +bungeecord-proxy = { group = "net.md-5", name = "bungeecord-proxy", version.ref = "bungeecord" } checker-qual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerframework" } commodore = { group = "me.lucko", name = "commodore", version.ref = "commodore" } guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }