Ichbinjoe / MCAuthenticator

2FA for Minecraft!
https://www.spigotmc.org/resources/mcauthenticator.18727/
GNU General Public License v3.0
42 stars 15 forks source link

Issue with latest commit #43

Closed m4tzess closed 1 month ago

m4tzess commented 4 years ago

Hello,

I have compiled the plugin from the latest commit and am experiencing an issue.

At least when a player needs to register by the mcauthenticator.lock permission, (the player can still move around and break/place blocks, but I don't know if that's intended behavior) the map doesn't appear in the inventory and the console shows the following error:

Could not pass event PlayerJoinEvent to MCAuthenticator v2.0.5-SNAPSHOT
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) [patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.PlayerList.onPlayerJoin(PlayerList.java:314) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.PlayerList.a(PlayerList.java:173) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.LoginListener.b(LoginListener.java:144) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.LoginListener.c(LoginListener.java:54) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.NetworkManager.a(NetworkManager.java:231) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.ServerConnection.c(ServerConnection.java:148) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:875) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: java.lang.NoSuchMethodError: org.bukkit.inventory.PlayerInventory.setItemInMainHand(Lorg/bukkit/inventory/ItemStack;)V
at io.ibj.mcauthenticator.auth.RFC6238.sendAndRenderMap(RFC6238.java:127) ~[?:?]
at io.ibj.mcauthenticator.auth.RFC6238.initUser(RFC6238.java:104) ~[?:?]
at io.ibj.mcauthenticator.model.User.init2fa(User.java:109) ~[?:?]
at io.ibj.mcauthenticator.MCAuthenticator.handlePlayer(MCAuthenticator.java:73) ~[?:?]
at io.ibj.mcauthenticator.engine.events.ConnectionEvent.onPlayerConnect(ConnectionEvent.java:48) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[patched.jar:git-PaperSpigot-"4c7641d"]
... 15 more

I am using Paper 1.8.8 as server software.

If any other information is needed to fix this issue, I'd be glad to help.

Thanks, -Mathis

aaomidi commented 4 years ago

Caused by: java.lang.NoSuchMethodError: org.bukkit.inventory.PlayerInventory.setItemInMainHand(Lorg/bukkit/inventory/ItemStack;)

Probably because this method doesn't exist for that version of Minecraft

astei commented 4 years ago

Indeed, 8d6354f4d broke <1.13 support. Will look into it, I haven't had time to look after this.

m4tzess commented 4 years ago

Okay, thanks to the both of you. If you need anything else, shoot me a message.