diff --git a/build.gradle b/build.gradle index 6c3205f..3f75f2b 100644 --- a/build.gradle +++ b/build.gradle @@ -91,8 +91,8 @@ dependencies { minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.5' shade("org.yaml:snakeyaml:1.28") - shade("com.viaversion:viaversion:4.3.2-SNAPSHOT") { transitive = false } - shade("com.viaversion:viabackwards:4.3.1-SNAPSHOT") + shade("com.viaversion:viaversion:4.5.0-22w43a-SNAPSHOT") { transitive = false } + shade("com.viaversion:viabackwards:4.5.0-22w43a-SNAPSHOT") shade("com.viaversion:viarewind-fabric:2.0.3-SNAPSHOT") compile(files( diff --git a/src/main/java/de/rexlmanu/viaversionaddon/platform/AddonPlatform.java b/src/main/java/de/rexlmanu/viaversionaddon/platform/AddonPlatform.java index 7f683d3..2bda107 100644 --- a/src/main/java/de/rexlmanu/viaversionaddon/platform/AddonPlatform.java +++ b/src/main/java/de/rexlmanu/viaversionaddon/platform/AddonPlatform.java @@ -3,13 +3,16 @@ import com.viaversion.viaversion.api.command.ViaCommandSender; import com.viaversion.viaversion.api.configuration.ConfigurationProvider; import com.viaversion.viaversion.api.configuration.ViaVersionConfig; +import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.platform.PlatformTask; +import com.viaversion.viaversion.api.platform.UnsupportedSoftware; import com.viaversion.viaversion.api.platform.ViaPlatform; import com.viaversion.viaversion.libs.gson.JsonObject; import de.rexlmanu.viaversionaddon.ViaVersionAddon; import de.rexlmanu.viaversionaddon.utility.FutureTaskId; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; +import java.util.Collection; import lombok.Getter; import java.io.File; @@ -98,6 +101,11 @@ public boolean kickPlayer(UUID uuid, String s) { return false; } + @Override + public boolean disconnect(UserConnection connection, String message) { + return ViaPlatform.super.disconnect(connection, message); + } + @Override public boolean isPluginEnabled() { return true; @@ -128,6 +136,16 @@ public boolean isOldClientsAllowed() { return true; } + @Override + public Collection getUnsupportedSoftwareClasses() { + return ViaPlatform.super.getUnsupportedSoftwareClasses(); + } + + @Override + public boolean hasPlugin(String name) { + return false; + } + private > GenericFutureListener errorLogger() { return future -> { if (!future.isCancelled() && future.cause() != null) {