Add back default getProtocolPath with int versions

This commit is contained in:
Nassim Jahnke 2024-02-15 15:45:23 +01:00
parent c7baa27fd0
commit e2a7e10312
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -138,6 +138,11 @@ public interface ProtocolManager {
*/
@Nullable List<ProtocolPathEntry> getProtocolPath(ProtocolVersion clientVersion, ProtocolVersion serverVersion);
@Deprecated
default @Nullable List<ProtocolPathEntry> getProtocolPath(int clientVersion, int serverVersion) {
return getProtocolPath(ProtocolVersion.getProtocol(VersionType.RELEASE, clientVersion), ProtocolVersion.getProtocol(VersionType.RELEASE, serverVersion));
}
/**
* Returns a versioned packet transformer to transform and send packets from a given base version to any client version supported by Via.
* The used packet types have to match the given protocol version.