From d6b5b5dc3efe0f3b4957651f38e0e7b002e94fd9 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 12 May 2024 20:48:44 +0200 Subject: [PATCH] Move PS compatibility to an addon PS has long been dead, so moving it away removes unnecessary complexity/the extra module. The additional code when getting the protocol version was long dead as well, since all connections are injected. --- .../com/viaversion/viaversion/api/ViaAPI.java | 3 - .../api/connection/ConnectionManager.java | 4 - .../viaversion/api/platform/ViaPlatform.java | 9 -- .../bukkit/util/ProtocolSupportUtil.java | 61 ---------- bukkit/build.gradle.kts | 1 - .../viaversion/ViaVersionPlugin.java | 11 -- .../bukkit/compat/ProtocolSupportCompat.java | 104 ------------------ .../ProtocolSupportConnectionListener.java | 87 --------------- .../bukkit/platform/BukkitViaAPI.java | 18 --- .../bukkit/platform/BukkitViaLoader.java | 7 -- .../protocols/base/BaseProtocol.java | 2 +- .../protocols/base/BaseProtocol1_7.java | 2 +- .../protocolsupport-compat/build.gradle.kts | 2 - .../java/protocolsupport/api/Connection.java | 18 --- settings.gradle.kts | 2 +- 15 files changed, 3 insertions(+), 328 deletions(-) delete mode 100644 bukkit-legacy/src/main/java/com/viaversion/viaversion/bukkit/util/ProtocolSupportUtil.java delete mode 100644 bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportCompat.java delete mode 100644 bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportConnectionListener.java delete mode 100644 compat/protocolsupport-compat/build.gradle.kts delete mode 100644 compat/protocolsupport-compat/src/main/java/protocolsupport/api/Connection.java diff --git a/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java b/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java index 28824ce4a..c729b1d63 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java +++ b/api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java @@ -78,7 +78,6 @@ public interface ViaAPI { /** * Returns the protocol version of a player. - * This will also retrieve the version from ProtocolSupport if it's being used. * * @param player the platform's player object, e.g. Bukkit this is Player * @return protocol version, for example (47=1.8-1.8.8, 107=1.9, 108=1.9.1), or -1 if no longer connected @@ -89,7 +88,6 @@ public interface ViaAPI { /** * Returns the protocol version of a player. - * This will also retrieve the version from ProtocolSupport if it's being used. * * @param player the platform's player object, e.g. Bukkit this is Player * @return the protocol version object (see {@link ProtocolVersion}), or ProtocolVersion.unknown if not connected @@ -109,7 +107,6 @@ public interface ViaAPI { /** * Returns the protocol version of a player. - * This will also retrieve the version from ProtocolSupport if it's being used. * * @param uuid UUID of a player * @return the protocol version object (see {@link ProtocolVersion}), or ProtocolVersion.unknown if not connected diff --git a/api/src/main/java/com/viaversion/viaversion/api/connection/ConnectionManager.java b/api/src/main/java/com/viaversion/viaversion/api/connection/ConnectionManager.java index 8f066181d..4654da456 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/connection/ConnectionManager.java +++ b/api/src/main/java/com/viaversion/viaversion/api/connection/ConnectionManager.java @@ -54,7 +54,6 @@ public interface ConnectionManager { * Returns the frontend UserConnection from the player connected to this proxy server * Returns null when there isn't a server or connection was not found * When ViaVersion is reloaded, this method may not return some players. - * May not return ProtocolSupport players. *

* Note that connections are removed as soon as their channel is closed, * so avoid using this method during player quits for example. @@ -67,7 +66,6 @@ public interface ConnectionManager { * Returns the UUID from the frontend connection to this proxy server * Returns null when there isn't a server or this connection isn't frontend, or it doesn't have an id * When ViaVersion is reloaded, this method may not return some players. - * May not return ProtocolSupport players. *

* Note that connections are removed as soon as their channel is closed, * so avoid using this method during player quits for example. @@ -81,7 +79,6 @@ public interface ConnectionManager { * May contain duplicated UUIDs on multiple ProtocolInfo. * May contain frontend, backend and/or client-sided connections. * When ViaVersion is reloaded, this method may not return some players. - * May not contain ProtocolSupport players. * * @return connected UserConnections */ @@ -91,7 +88,6 @@ public interface ConnectionManager { * Returns a map containing the UUIDs and frontend UserConnections from players connected to this proxy server * Returns empty list when there isn't a server * When ViaVersion is reloaded, this method may not return some players. - * May not contain ProtocolSupport players. * * @return map containing the UUIDs and frontend UserConnections from players connected to this proxy server */ diff --git a/api/src/main/java/com/viaversion/viaversion/api/platform/ViaPlatform.java b/api/src/main/java/com/viaversion/viaversion/api/platform/ViaPlatform.java index 72f18d6d5..01b58f04f 100644 --- a/api/src/main/java/com/viaversion/viaversion/api/platform/ViaPlatform.java +++ b/api/src/main/java/com/viaversion/viaversion/api/platform/ViaPlatform.java @@ -200,15 +200,6 @@ public interface ViaPlatform { */ JsonObject getDump(); - /** - * Get if older clients are allowed using ViaVersion. - * - * @return True if allowed - */ - default boolean isOldClientsAllowed() { - return true; - } - /** * Returns an immutable collection of classes to be checked as unsupported software with their software name. * If any of the classes exist at runtime, a warning about their potential instability will be given to the console. diff --git a/bukkit-legacy/src/main/java/com/viaversion/viaversion/bukkit/util/ProtocolSupportUtil.java b/bukkit-legacy/src/main/java/com/viaversion/viaversion/bukkit/util/ProtocolSupportUtil.java deleted file mode 100644 index edf7d4f2a..000000000 --- a/bukkit-legacy/src/main/java/com/viaversion/viaversion/bukkit/util/ProtocolSupportUtil.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion - * Copyright (C) 2016-2024 ViaVersion and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.viaversion.viaversion.bukkit.util; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.logging.Level; -import com.viaversion.viaversion.api.Via; -import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; -import com.viaversion.viaversion.api.protocol.version.VersionType; -import org.bukkit.entity.Player; - -public final class ProtocolSupportUtil { - private static final Method PROTOCOL_VERSION_METHOD; - private static final Method GET_ID_METHOD; - - static { - Method protocolVersionMethod = null; - Method getIdMethod = null; - try { - protocolVersionMethod = Class.forName("protocolsupport.api.ProtocolSupportAPI").getMethod("getProtocolVersion", Player.class); - getIdMethod = Class.forName("protocolsupport.api.ProtocolVersion").getMethod("getId"); - } catch (ReflectiveOperationException e) { - // ProtocolSupport not installed. - } - PROTOCOL_VERSION_METHOD = protocolVersionMethod; - GET_ID_METHOD = getIdMethod; - } - - public static ProtocolVersion getProtocolVersion(Player player) { - if (PROTOCOL_VERSION_METHOD == null) { - return ProtocolVersion.unknown; - } - try { - final Object version = PROTOCOL_VERSION_METHOD.invoke(null, player); - final int id = (int) GET_ID_METHOD.invoke(version); - // List of pre netty (<= 1.6.4) versions supported by ProtocolSupport, needs to be updated if ProtocolSupport adds support for new versions. - final boolean preNetty = id == 78 || id == 74 || id == 73 || id == 61 || id == 60 || id == 51; - - return ProtocolVersion.getProtocol(preNetty ? VersionType.RELEASE_INITIAL : VersionType.RELEASE, id); - } catch (IllegalAccessException | InvocationTargetException e) { - Via.getPlatform().getLogger().log(Level.SEVERE, "Failed to get ProtocolSupport version", e); - } - return ProtocolVersion.unknown; - } -} diff --git a/bukkit/build.gradle.kts b/bukkit/build.gradle.kts index 2a6e1f746..7146ad140 100644 --- a/bukkit/build.gradle.kts +++ b/bukkit/build.gradle.kts @@ -6,7 +6,6 @@ dependencies { exclude("com.google.code.gson", "gson") exclude("javax.persistence", "persistence-api") } - compileOnly(projects.compat.protocolsupportCompat) } publishShadowJar() diff --git a/bukkit/src/main/java/com/viaversion/viaversion/ViaVersionPlugin.java b/bukkit/src/main/java/com/viaversion/viaversion/ViaVersionPlugin.java index 4cd61ae5c..1036abbf5 100644 --- a/bukkit/src/main/java/com/viaversion/viaversion/ViaVersionPlugin.java +++ b/bukkit/src/main/java/com/viaversion/viaversion/ViaVersionPlugin.java @@ -59,7 +59,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform private final BukkitCommandHandler commandHandler = new BukkitCommandHandler(); private final BukkitViaConfig conf; private final ViaAPI api = new BukkitViaAPI(this); - private boolean protocolSupport; private boolean lateBind; public ViaVersionPlugin() { @@ -78,7 +77,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform @Override public void onLoad() { - protocolSupport = Bukkit.getPluginManager().getPlugin("ProtocolSupport") != null; lateBind = !((BukkitViaInjector) Via.getManager().getInjector()).isBinded(); if (!lateBind) { @@ -241,11 +239,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform return platformSpecific; } - @Override - public boolean isOldClientsAllowed() { - return !protocolSupport; // Use protocolsupport for older clients - } - @Override public BukkitViaConfig getConf() { return conf; @@ -279,10 +272,6 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaPlatform return lateBind; } - public boolean isProtocolSupport() { - return protocolSupport; - } - /** * @deprecated use {@link Via#getAPI()} instead */ diff --git a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportCompat.java b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportCompat.java deleted file mode 100644 index aeeefc23a..000000000 --- a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportCompat.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion - * Copyright (C) 2016-2024 ViaVersion and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.viaversion.viaversion.bukkit.compat; - -import com.viaversion.viaversion.ViaVersionPlugin; -import com.viaversion.viaversion.api.Via; -import com.viaversion.viaversion.bukkit.util.NMSUtil; -import java.util.logging.Level; -import org.bukkit.Bukkit; -import org.bukkit.event.Event; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; - -public final class ProtocolSupportCompat { - - public static void registerPSConnectListener(ViaVersionPlugin plugin) { - Via.getPlatform().getLogger().info("Registering ProtocolSupport compat connection listener"); - try { - //noinspection unchecked - Class connectionOpenEvent = (Class) Class.forName("protocolsupport.api.events.ConnectionOpenEvent"); - Bukkit.getPluginManager().registerEvent(connectionOpenEvent, new Listener() { - }, EventPriority.HIGH, (listener, event) -> { - try { - Object connection = event.getClass().getMethod("getConnection").invoke(event); - ProtocolSupportConnectionListener connectListener = new ProtocolSupportConnectionListener(connection); - ProtocolSupportConnectionListener.ADD_PACKET_LISTENER_METHOD.invoke(connection, connectListener); - } catch (ReflectiveOperationException e) { - Via.getPlatform().getLogger().log(Level.WARNING, "Error when handling ProtocolSupport event", e); - } - }, plugin); - } catch (ClassNotFoundException e) { - Via.getPlatform().getLogger().log(Level.WARNING, "Unable to register ProtocolSupport listener", e); - } - } - - public static boolean isMultiplatformPS() { - try { - Class.forName("protocolsupport.zplatform.impl.spigot.network.pipeline.SpigotPacketEncoder"); - return true; - } catch (ClassNotFoundException e) { - return false; - } - } - - static HandshakeProtocolType handshakeVersionMethod() { - Class clazz = null; - // Check for the mapped method - try { - clazz = NMSUtil.nms( - "PacketHandshakingInSetProtocol", - "net.minecraft.network.protocol.handshake.PacketHandshakingInSetProtocol" - ); - clazz.getMethod("getProtocolVersion"); - return HandshakeProtocolType.MAPPED; - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } catch (NoSuchMethodException ignored) { - } - - // Check for obfuscated b/c methods - try { - if (clazz.getMethod("b").getReturnType() == int.class) { - return HandshakeProtocolType.OBFUSCATED_B; - } else if (clazz.getMethod("c").getReturnType() == int.class) { - return HandshakeProtocolType.OBFUSCATED_C; - } - throw new UnsupportedOperationException("Protocol version method not found in " + clazz.getSimpleName()); - } catch (ReflectiveOperationException e) { - throw new RuntimeException(e); - } - } - - enum HandshakeProtocolType { - - MAPPED("getProtocolVersion"), - OBFUSCATED_B("b"), - OBFUSCATED_C("c"); - - private final String methodName; - - HandshakeProtocolType(String methodName) { - this.methodName = methodName; - } - - public String methodName() { - return methodName; - } - } -} diff --git a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportConnectionListener.java b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportConnectionListener.java deleted file mode 100644 index 33928cebc..000000000 --- a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/compat/ProtocolSupportConnectionListener.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion - * Copyright (C) 2016-2024 ViaVersion and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.viaversion.viaversion.bukkit.compat; - -import com.viaversion.viaversion.api.Via; -import com.viaversion.viaversion.bukkit.util.NMSUtil; -import java.lang.reflect.Method; -import protocolsupport.api.Connection; - -final class ProtocolSupportConnectionListener extends Connection.PacketListener { - - static final Method ADD_PACKET_LISTENER_METHOD; - private static final Class HANDSHAKE_PACKET_CLASS; - private static final Method GET_VERSION_METHOD; - private static final Method SET_VERSION_METHOD; - private static final Method REMOVE_PACKET_LISTENER_METHOD; - private static final Method GET_LATEST_METHOD; - private static final Object PROTOCOL_VERSION_MINECRAFT_FUTURE; - private static final Object PROTOCOL_TYPE_PC; - - static { - try { - HANDSHAKE_PACKET_CLASS = NMSUtil.nms( - "PacketHandshakingInSetProtocol", - "net.minecraft.network.protocol.handshake.PacketHandshakingInSetProtocol" - ); - - final Class connectionImplClass = Class.forName("protocolsupport.protocol.ConnectionImpl"); - final Class connectionClass = Class.forName("protocolsupport.api.Connection"); - final Class packetListenerClass = Class.forName("protocolsupport.api.Connection$PacketListener"); - final Class protocolVersionClass = Class.forName("protocolsupport.api.ProtocolVersion"); - final Class protocolTypeClass = Class.forName("protocolsupport.api.ProtocolType"); - GET_VERSION_METHOD = connectionClass.getDeclaredMethod("getVersion"); - SET_VERSION_METHOD = connectionImplClass.getDeclaredMethod("setVersion", protocolVersionClass); - PROTOCOL_VERSION_MINECRAFT_FUTURE = protocolVersionClass.getDeclaredField("MINECRAFT_FUTURE").get(null); - GET_LATEST_METHOD = protocolVersionClass.getDeclaredMethod("getLatest", protocolTypeClass); - PROTOCOL_TYPE_PC = protocolTypeClass.getDeclaredField("PC").get(null); - ADD_PACKET_LISTENER_METHOD = connectionClass.getDeclaredMethod("addPacketListener", packetListenerClass); - REMOVE_PACKET_LISTENER_METHOD = connectionClass.getDeclaredMethod("removePacketListener", packetListenerClass); - } catch (final ReflectiveOperationException e) { - throw new RuntimeException(e); - } - } - - private final Object connection; - - ProtocolSupportConnectionListener(final Object connection) { - this.connection = connection; - } - - @Override - public void onPacketReceiving(final Connection.PacketListener.PacketEvent event) { - try { - // Check if we are getting handshake packet. - if (HANDSHAKE_PACKET_CLASS.isInstance(event.getPacket()) && GET_VERSION_METHOD.invoke(connection) == PROTOCOL_VERSION_MINECRAFT_FUTURE) { - final Object packet = event.getPacket(); - final int protocolVersion = (int) HANDSHAKE_PACKET_CLASS.getDeclaredMethod(ProtocolSupportCompat.handshakeVersionMethod().methodName()).invoke(packet); - - // ViaVersion has at this point already spoofed the connectionversion. (Since it is higher up the pipeline) - // If via has put the protoVersion to the server we can spoof ProtocolSupport's version. - if (protocolVersion == Via.getAPI().getServerVersion().lowestSupportedVersion()) { - SET_VERSION_METHOD.invoke(connection, GET_LATEST_METHOD.invoke(null, PROTOCOL_TYPE_PC)); - } - } - // Id version is not serverversion viaversion will not spoof. ProtocolSupport will handle the rest. - // In any case, remove the packet listener and wrap up. - REMOVE_PACKET_LISTENER_METHOD.invoke(connection, this); - } catch (final ReflectiveOperationException e) { - throw new RuntimeException(e); - } - } -} diff --git a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaAPI.java b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaAPI.java index ec05c1817..dae8e9cb2 100644 --- a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaAPI.java +++ b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaAPI.java @@ -22,10 +22,8 @@ import com.viaversion.viaversion.ViaVersionPlugin; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; -import com.viaversion.viaversion.bukkit.util.ProtocolSupportUtil; import io.netty.buffer.ByteBuf; import java.util.UUID; -import org.bukkit.Bukkit; import org.bukkit.entity.Player; public class BukkitViaAPI extends ViaAPIBase { @@ -46,13 +44,6 @@ public class BukkitViaAPI extends ViaAPIBase { if (connection != null) { return connection.getProtocolInfo().protocolVersion(); } - - if (isProtocolSupport()) { - Player player = Bukkit.getPlayer(uuid); - if (player != null) { - return ProtocolSupportUtil.getProtocolVersion(player); - } - } return ProtocolVersion.unknown; } @@ -60,13 +51,4 @@ public class BukkitViaAPI extends ViaAPIBase { public void sendRawPacket(Player player, ByteBuf packet) throws IllegalArgumentException { sendRawPacket(player.getUniqueId(), packet); } - - /** - * Returns if ProtocolSupport is also being used. - * - * @return true if ProtocolSupport is used - */ - public boolean isProtocolSupport() { - return plugin.isProtocolSupport(); - } } diff --git a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaLoader.java b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaLoader.java index 3de03ef78..295095f59 100644 --- a/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaLoader.java +++ b/bukkit/src/main/java/com/viaversion/viaversion/bukkit/platform/BukkitViaLoader.java @@ -23,7 +23,6 @@ import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.platform.ViaPlatformLoader; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; -import com.viaversion.viaversion.bukkit.compat.ProtocolSupportCompat; import com.viaversion.viaversion.bukkit.listeners.UpdateListener; import com.viaversion.viaversion.bukkit.listeners.multiversion.PlayerSneakListener; import com.viaversion.viaversion.bukkit.listeners.protocol1_15to1_14_4.EntityToggleGlideListener; @@ -76,12 +75,6 @@ public class BukkitViaLoader implements ViaPlatformLoader { /* Base Protocol */ final ViaVersionPlugin plugin = (ViaVersionPlugin) Bukkit.getPluginManager().getPlugin("ViaVersion"); - - // Add ProtocolSupport ConnectListener if necessary. - if (plugin.isProtocolSupport() && ProtocolSupportCompat.isMultiplatformPS()) { - ProtocolSupportCompat.registerPSConnectListener(plugin); - } - if (!Via.getAPI().getServerVersion().isKnown()) { Via.getPlatform().getLogger().severe("Server version has not been loaded yet, cannot register additional listeners"); return; diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol.java b/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol.java index b36f2a405..66595602e 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/base/BaseProtocol.java @@ -84,7 +84,7 @@ public class BaseProtocol extends AbstractProtocol protocols = null; - if (info.protocolVersion().newerThanOrEqualTo(closestServerProtocol) || Via.getPlatform().isOldClientsAllowed()) { + if (info.protocolVersion().newerThanOrEqualTo(closestServerProtocol)) { protocols = Via.getManager().getProtocolManager() .getProtocolPath(info.protocolVersion(), closestServerProtocol); } diff --git a/compat/protocolsupport-compat/build.gradle.kts b/compat/protocolsupport-compat/build.gradle.kts deleted file mode 100644 index 7d82dc72f..000000000 --- a/compat/protocolsupport-compat/build.gradle.kts +++ /dev/null @@ -1,2 +0,0 @@ -dependencies { -} diff --git a/compat/protocolsupport-compat/src/main/java/protocolsupport/api/Connection.java b/compat/protocolsupport-compat/src/main/java/protocolsupport/api/Connection.java deleted file mode 100644 index 8f9802603..000000000 --- a/compat/protocolsupport-compat/src/main/java/protocolsupport/api/Connection.java +++ /dev/null @@ -1,18 +0,0 @@ -package protocolsupport.api; - -public abstract class Connection { - - public abstract static class PacketListener { - - public void onPacketReceiving(PacketEvent event) { - throw new UnsupportedOperationException(); - } - - public static class PacketEvent { - - public Object getPacket() { - throw new UnsupportedOperationException(); - } - } - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 2ed77abe1..46c8706f0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -27,7 +27,7 @@ rootProject.name = "viaversion-parent" includeBuild("build-logic") -include("compat", "compat:snakeyaml-compat-common", "compat:snakeyaml2-compat", "compat:snakeyaml1-compat", "compat:protocolsupport-compat") +include("compat", "compat:snakeyaml-compat-common", "compat:snakeyaml2-compat", "compat:snakeyaml1-compat") setupViaSubproject("api") setupViaSubproject("common")