GabiJunkes / MultipleBedSpawn

A simple Minecraft plugin to allow players to choose which bed to respawn into.
GNU General Public License v3.0
9 stars 3 forks source link

[Bug] Plugin doesn't working on 1.16.5 #24

Closed andryqx closed 9 months ago

andryqx commented 10 months ago

Java 17, tried different cores.

[10:36:29] [Server thread/ERROR] [Minecraft/]: Could not pass event PlayerRespawnEvent to MultipleBedSpawn v1.9 org.bukkit.event.EventException: null at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303) ~[forge:?] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[forge:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:593) ~[forge:?] at net.minecraft.server.management.PlayerList.func_232644a(PlayerList.java:597) ~[?:?] at net.minecraft.network.play.ServerPlayNetHandler.func_147342_a(ServerPlayNetHandler.java:2056) ~[?:?] at net.minecraft.network.play.client.CClientStatusPacket.func_148833_a(SourceFile:30) ~[?:?] at net.minecraft.network.play.client.CClientStatusPacket.func_148833_a(SourceFile:8) ~[?:?] at net.minecraft.network.PacketThreadUtil.func_225383_a(PacketThreadUtil.java:22) ~[?:?] at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:153) ~[?:?] at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:936) ~[?:?] at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:174) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:919) ~[?:?] at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:913) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(ThreadTaskExecutor.java:114) ~[?:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:1033) ~[?:?] at net.minecraft.server.MinecraftServer.func_240802v(MinecraftServer.java:815) ~[?:?] at net.minecraft.server.MinecraftServer.func_240783a(MinecraftServer.java:267) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.NullPointerException: Cannot invoke "String.split(String)" because the return value of "org.bukkit.persistence.PersistentDataContainer.get(org.bukkit.NamespacedKey, org.bukkit.persistence.PersistentDataType)" is null at me.gabrielfj.multiplebedspawn.listeners.RespawnMenuHandler.openRespawnMenu(RespawnMenuHandler.java:196) ~[?:?] at me.gabrielfj.multiplebedspawn.listeners.PlayerRespawnListener.onPlayerRespawn(PlayerRespawnListener.java:69) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[forge:?] ... 20 more

GabiJunkes commented 10 months ago

How are you able to run the plugin on 1.16.5? are you changing the api version to 1.16? There are a lot a incompatibilities with 1.19 version.

andryqx commented 10 months ago

How are you able to run the plugin on 1.16.5? are you changing the api version to 1.16? There are a lot a incompatibilities with 1.19 version.

yes, i changed api version to 1.16.. past version seems to work well, but it had bugs, which i told you before (invulnerability is one of that), it's very sad that i can't run 1.8+ version on my 1.16 server, players loved that mechanic :(

GabiJunkes commented 10 months ago

That makes a lot of sense now, I tried converting the code to work on 1.16, and I am able to run it, but I dont get the errors you describe. I am willing to release a version to 1.16 since I have some free time now. How did you cause this error?

GabiJunkes commented 10 months ago

I did some testing, in mohist 1.16.5, I cant set player invisible or flying and a lot of stuff like lock player on the spawn bed menu does not work. I run a paper 1.16.5 server with -DPaper.IgnoreJavaVersion=true so that I can run it with java 17 and the plugin works fine after the changes. Do you want this 1.16.5 jar file to test as well?

andryqx commented 10 months ago

I did some testing, in mohist 1.16.5, I cant set player invisible or flying and a lot of stuff like lock player on the spawn bed menu does not work. I run a paper 1.16.5 server with -DPaper.IgnoreJavaVersion=true so that I can run it with java 17 and the plugin works fine after the changes. Do you want this 1.16.5 jar file to test as well?

yes, of course!

andryqx commented 10 months ago

I did some testing, in mohist 1.16.5, I cant set player invisible or flying and a lot of stuff like lock player on the spawn bed menu does not work. I run a paper 1.16.5 server with -DPaper.IgnoreJavaVersion=true so that I can run it with java 17 and the plugin works fine after the changes. Do you want this 1.16.5 jar file to test as well?

it's strange, because i've used <1.8 version on mohist 1.16.5 and it seems to work well except these bugs which you've already fixed. thanks for your replies, i'll test 1.16.5 version when you'll send it to me

GabiJunkes commented 9 months ago

MultipleBedSpawn-1.9-1.16.5.zip I had to zip it so I could send it here.

andryqx commented 9 months ago

MultipleBedSpawn-1.9-1.16.5.zip I had to zip it so I could send it here.

Thanks!! It works well, at least, for now

GabiJunkes commented 9 months ago

Well, good that it works for you. I will close this issue and the last one, and you can open another issue in the future.