Maxlego08 / zEssentials

Essentials suite for Folia and Paper.
Other
34 stars 18 forks source link

Can't get location after player die #92

Closed Dungjava closed 2 months ago

Dungjava commented 2 months ago

Terms

Discord Username (optional)

maiminhdung

Server Version

1.20.4

Server Software

image

zEssentials Version

image

zMenu Version

image

What happened?

When the player dies, there is a chance to cause "org.bukkit.entity.Player.getLocation()" and it make spam error on console ,can't /back on death either. We have tried on 1.21.1 and still get same error so

Steps to reproduce the issue

  1. Join server
  2. Just die
  3. Keep do it until get error

Full Server Log

https://mclo.gs/lkfp6lz

Error (optional)

[08:34:55] [Server thread/WARN]: [zEssentials] Task #1579993 for zEssentials v1.0.1.0 generated an exception
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Player.getLocation()" because the return value of "fr.maxlego08.essentials.user.ZUser.getPlayer()" is null
    at fr.maxlego08.essentials.user.ZUser.lambda$teleport$1(ZUser.java:240) ~[zEssentials-1.0.1.0.jar:?]
    at fr.maxlego08.essentials.libs.folialib.impl.SpigotImplementation.lambda$runTimer$4(SpigotImplementation.java:161) ~[zEssentials-1.0.1.0.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run() ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat() ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java) ~[pufferfishplus-1.20.4.jar:git-PufferfishPlus-45]
    at java.lang.Thread.run(Thread.java:1583) ~[?:?]

Other files, you can drag and drop them here to upload. (optional)

archive-2024-09-22T085150-0400.tar.gz

Screenshots/Videos (you can drag and drop files or paste links)

No response

Maxlego08 commented 2 months ago

Fixed in last commit bfac3fbd10193dfe4a5f7f73b303976597ed6583