rockyhawk64 / CommandPanels

Command Panels main Github page. Wiki Page Below:
https://commandpanels.net/home
GNU General Public License v3.0
94 stars 25 forks source link

Error on disconnect with unclosable open #287

Closed TinyTank800 closed 9 months ago

TinyTank800 commented 9 months ago

Terms

What server version are you running?

1.19

What CommandPanels version are you using?

latest

What server software are you running?

Purpur

What happened?

Error is posted on disconnect while having unclosable panel open. Reported by @ciliopiola

Steps to reproduce the issue

Create panel with unclosable enabled leave server error inside console

Expected behavior

No error

Error (optional)

[01:16:39 INFO]: Estailuuus lost connection: Disconnected
[01:16:39 INFO]: [ClothesPlus] Setting Estailuuus back to ADVENTURE
[01:16:39 WARN]: [CommandPanels] Task #3049452 for CommandPanels v3.19.1.7 generated an exception
java.lang.NullPointerException: Cannot assign field "isOpen" because the return value of "me.rockyhawk.commandpanels.openpanelsmanager.OpenPanelsLoader.getOpenPanel(String, me.rockyhawk.commandpanels.openpanelsmanager.PanelPosition)" is null
        at me.rockyhawk.commandpanels.openpanelsmanager.UtilsPanelsLoader$1.run(UtilsPanelsLoader.java:59) ~[CommandPanels.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:486) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1858]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

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

https://discord.com/channels/602338405883314206/749407995036696656/1195537408545009715 Message link

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

No response

TinyTank800 commented 9 months ago

Fix has been made and will be making a pull request when more changes are finished.