Latest ProtocolLib does not work with Paper 1.20.2 while earlier ones does.
NamerPRO opened this issue · 4 comments
- 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:
- Download AdvancedNMotd: https://www.spigotmc.org/resources/advancednmotd-let-your-motd-smile.58677/
- Put it to Paper's 1.20.2 (# 249) plugins folder with ProtocolLib SNAPSHOT 673 (latest at the moment of writing report).
- See that motd is not set and player cannot join server.
- Replace ProtocolLib SNAPSHOT 673 with earlier SNAPSHOT 669.
- 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):
When used with ProtocolLib SNAPSHOT 669:
Version Info
https://pastebin.com/j1vhfvL6
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
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
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