NavidK0 / Carbon

Carbon is a Spigot plugin which turns a spigot protocol hacked server (on 1.7.10) into a 1.8 server.
GNU Lesser General Public License v3.0
35 stars 19 forks source link

[Bug] Carbon protocol blocker not cleanly disconnecting players? #74

Closed mibby closed 10 years ago

mibby commented 10 years ago

Compiled source as of commit https://github.com/NavidK0/Carbon/commit/2a875140ece37a441675e20a41e8d54df3a5be5c

Blocking default protocols 4 and 5 (1.7.x). Users who try to login with the blocked client protocols are kicked, but the console outputs warnings from various plugins and online player count is inaccurate. It also seems those clients are able to get online in-game, then kicked. Is there no way to block them from joining?

[16:35:47] [Server thread/WARN]: [NoCheatPlus] DataMan inconsistencies: wrong number of online players (17 instead of 15)
[16:35:56] [User Authenticator #11/INFO]: UUID of player mibby is UUID-NUMBER
[16:35:56] [Server thread/INFO]: mibby lost connection: Please update to minecraft version 1.8.
[16:35:57] [Server thread/INFO]: [-] mibby has left the server.
[16:35:57] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to VoxelSniper v5.170.0-SNAPSHOT-jnks339-git1a17ed8
org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:509) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:494) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PlayerList.c(PlayerList.java:265) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.PlayerList.a(PlayerList.java:152) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.LoginListener.c(LoginListener.java:119) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.LoginListener.a(LoginListener.java:44) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:189) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
Caused by: java.lang.NullPointerException
    at com.thevoxelbox.voxelsniper.Sniper$SniperTool.<init>(Sniper.java:482) ~[?:?]
    at com.thevoxelbox.voxelsniper.Sniper$SniperTool.<init>(Sniper.java:472) ~[?:?]
    at com.thevoxelbox.voxelsniper.Sniper$SniperTool.<init>(Sniper.java:461) ~[?:?]
    at com.thevoxelbox.voxelsniper.Sniper.<init>(Sniper.java:45) ~[?:?]
    at com.thevoxelbox.voxelsniper.SniperManager.getSniperForPlayer(SniperManager.java:26) ~[?:?]
    at com.thevoxelbox.voxelsniper.VoxelSniperListener.onPlayerJoin(VoxelSniperListener.java:132) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_20]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_20]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    ... 14 more
[16:35:57] [Server thread/INFO]: mibby [/IP:PORT] logged in with entity id 5886 at ([world] -1522.5, 117.0, -14958.5)
[16:35:57] [Craft Scheduler Thread - 2/INFO]: [mcMMO] Aborting profile loading recovery for mibby - player logged out
[16:35:57] [Server thread/WARN]: [NoCheatPlus] DataMan inconsistencies: wrong number of online players (18 instead of 15)
[16:35:57] [Server thread/WARN]: [PwnFilter] Removing cached, but offline player: mibby
NavidK0 commented 10 years ago

Attempted to fix this as of the latest Carbon build. Report back and tell me what happens.

Shevchik commented 10 years ago

Should just probably move this to asyncprelogin event. Just need to figure out how protocol version is stored before player object is created