Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix constructor building for ConnectedPlayer.class #181

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

DIDIRUS4
Copy link
Contributor

Fixes the launch of the Limbo API on the new version of Velocity b460 and higher due new constructor arguments.

PaperMC/Velocity@c0fdf20#diff-1cd097c1de92fff8c43bc33eb4f52405eb5396f9e8cc922a4502e4cad12e1f88R191

@UserNugget
Copy link
Member

There are too many unrelated changes, can you please revert them?
It can be done much cleaner:

diff --git a/plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginListener.java b/plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginListener.java
--- a/plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginListener.java	(revision f172fd9a871df5fcc324fd6ee0adaf69cdf95c5f)
+++ b/plugin/src/main/java/net/elytrium/limboapi/injection/login/LoginListener.java	(date 1736923020482)
@@ -38,6 +38,7 @@
 import com.velocitypowered.api.event.player.GameProfileRequestEvent;
 import com.velocitypowered.api.event.player.PlayerChooseInitialServerEvent;
 import com.velocitypowered.api.event.player.ServerConnectedEvent;
+import com.velocitypowered.api.network.HandshakeIntent;
 import com.velocitypowered.api.network.ProtocolVersion;
 import com.velocitypowered.api.proxy.InboundConnection;
 import com.velocitypowered.api.proxy.crypto.IdentifiedKey;
@@ -173,6 +174,7 @@
               inboundConnection.getVirtualHost().orElse(null),
               ((InboundConnection) inboundConnection).getRawVirtualHost().orElse(null),
               event.isOnlineMode(),
+              ((InboundConnection) inboundConnection).getHandshakeIntent(),
               playerKey
           );
 
@@ -320,6 +322,7 @@
                   InetSocketAddress.class,
                   String.class,
                   boolean.class,
+                  HandshakeIntent.class,
                   IdentifiedKey.class
               )
           );

@DIDIRUS4
Copy link
Contributor Author

"unrelated changes" due VSCode auto code style formatting.

Done

@hevav hevav merged commit c6e03b6 into Elytrium:master Jan 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants