Skip to content

Error enabling latest TCPShield 2.8.0 plugin with Spigot 1.20.6 #107

@Vlurk

Description

@Vlurk

Upgrade a working environment with older release and Spigot 1.20.4 to:

TCPShield=2.8.0
Spigot=1.20.6
ProtocolLib=5.3.0
Java=jdk-21.0.3+9

Server starts just fine, but the plugin doesn't log the IP of the clients, just the TCPShield proxies. In the server log, I get the following error:

[23:42:14] [Server thread/ERROR]: Error occurred while enabling TCPShield v2.8.0 (Is it up to date?)
java.lang.NoSuchMethodError: 'java.lang.String org.bukkit.Server.getMinecraftVersion()'
        at net.tcpshield.tcpshield.bukkit.TCPShieldBukkit.onEnable(TCPShieldBukkit.java:42) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:491) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R4.CraftServer.enablePlugin(CraftServer.java:541) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at org.bukkit.craftbukkit.v1_20_R4.CraftServer.enablePlugins(CraftServer.java:455) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:634) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:419) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:265) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1010) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:311) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4149-Spigot-e2c1eee-4e7d749]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]

Just a quick check, and getMinecraftVersion is not a valid method with Spigot API: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Server.html

NoSuchMethodError would be pretty much expected in these circumstances. Looking at GitHub, I see that a new routine was added with commit 554d6c3, creating the error.

As a last resort, I tried to downgrade to the previous release, 2.7.0, I can confirm this error does not exist and everything work as expected: I get the client IPs in the logs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions