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

Latest ProtocolLib does not work with Paper 1.20.2 while earlier ones does. #2593

Closed
1 task done
NamerPRO opened this issue Oct 28, 2023 · 4 comments
Closed
1 task done

Comments

@NamerPRO
Copy link

  • This issue is not solved in a development build

Describe the bug
Motd is not set via ProtocolLib Snapshot 5.1.1-SNAPSHOT-673 on Paper 1.20.2 (# 249) server and a player cannot join server while with ProtocolLib 5.1.1-SNAPSHOT-669 same code works fine. There are no errors in console.

To Reproduce
Steps to reproduce the behavior:

  1. Download AdvancedNMotd: https://www.spigotmc.org/resources/advancednmotd-let-your-motd-smile.58677/
  2. Put it to Paper's 1.20.2 (# 249) plugins folder with ProtocolLib SNAPSHOT 673 (latest at the moment of writing report).
  3. See that motd is not set and player cannot join server.
  4. Replace ProtocolLib SNAPSHOT 673 with earlier SNAPSHOT 669.
  5. See that motd is set correctly and player can join server.

Expected behavior
Motd must be set and player must have an access to join server.

Screenshots
When used with ProtocolLib SNAPSHOT 673 (latest at the moment of writing report):
iimg

When used with ProtocolLib SNAPSHOT 669:
iimg

Version Info
https://pastebin.com/j1vhfvL6

@Dymeth
Copy link

Dymeth commented Oct 29, 2023

Are you using TCPShield or any another plugins? Looks like it's some plugins incompatibility in ProtocolLib 1.5.1+. You can test it without any plugins, just ProtocolLib?

I have the same issue with ProtocolLib 5.1.1-SNAPSHOT-673 and TCPShield 2.6.1 on Paper version git-Paper-260 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 1865625)

I tested some more dev builds. Build 669 have no this problem, but 670 already have. So, looks problem appears after this commit: af33a2a

I also want to clarify that no any errors occur in the server and client logs on startup an logging.

TCPShield releases can be found here: https://github.com/TCPShield/RealIP/releases

@Kar1nfil
Copy link

someone can send link to ProtocolLib SNAPSHOT 669? Version 1.20.2

@NamerPRO
Copy link
Author

Are you using TCPShield or any another plugins? Looks like it's some plugins incompatibility in ProtocolLib 1.5.1+. You can test it without any plugins, just ProtocolLib?

I have the same issue with ProtocolLib 5.1.1-SNAPSHOT-673 and TCPShield 2.6.1 on Paper version git-Paper-260 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 1865625)

I tested some more dev builds. Build 669 have no this problem, but 670 already have. So, looks problem appears after this commit: af33a2a

I also want to clarify that no any errors occur in the server and client logs on startup an logging.

TCPShield releases can be found here: https://github.com/TCPShield/RealIP/releases

I do not use neither TCPShield not other plugins. I tested AdvancedNMotd being the only plugin at the server excluding ProtocolLIB before writing this issue.

someone can send link to ProtocolLib SNAPSHOT 669? Version 1.20.2

Here: https://ci.dmulloy2.net/job/ProtocolLib/669/

@Dymeth
Copy link

Dymeth commented Nov 2, 2023

I do not use neither TCPShield not other plugins. I tested AdvancedNMotd being the only plugin at the server excluding ProtocolLIB before writing this issue.

Issue appears when using AdvancedNMotd too. So, if AdvancedNMotd isn't installed there are no any problems with ping or joining server.

I checked out the both plugins code (TCPShield and AdvancedNMotd) and find out that this is what is causing the ping and server connection problems. Is just enough to register packet adapter with packet PacketType.Handshake.Client.SET_PROTOCOL:

@Override
public void onEnable() {
    ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, PacketType.Handshake.Client.SET_PROTOCOL) {
        @Override
        public void onPacketReceiving(PacketEvent event) {
        }
    });
}

There are no any errors in the console, but the onPacketReceiving() method is not called.
Also connecting to the server becomes impossible ("Disconnected" error), and “Incompatible version!” is displayed in the list of servers.

TCPShield registration: https://github.com/TCPShield/RealIP/blob/bb7511d37f915ea1b8416ac24dd8564b9d3d0e20/src/main/java/net/tcpshield/tcpshield/bukkit/protocollib/handler/ProtocolLibHandshakeHandler.java#L18

AdvancedNMotd registration: https://github.com/NamerPRO/AdvancedNMotd/blob/b764e435696ca9b5fc0a0ef1a77e417261e9dee2/src/ru/namerpro/AdvancedNMotd/Bukkit/Main.java#L61

UPD: Looks like nickuc already described this issue: #2601

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

No branches or pull requests

4 participants