cervinakuy / KitPvP

An all-in-one battle plugin built using customizable kits and features.
https://www.spigotmc.org/resources/27107/
97 stars 50 forks source link

Having kit menu open while respawning clears all kits #246

Open whizvox opened 3 months ago

whizvox commented 3 months ago

Description of the bug If a player opens the kit menu while waiting to respawn and waits out the timer, the action of clearing the player's kit will also clear all items from the kit menu, rendering all other players unable to select any kits. Doing /kp reload will fix this, but only until someone else triggers the bug.

Screenshot of /kp debug 2024-06-07_21 17 33

Additional screenshots or video (if applicable)

Can't select any kits 2024-06-07_21 19 14

Pastebin.com of any relevant .yml files (if applicable) n/a

whizvox commented 3 months ago

Update: this happens because of my plugins and configurations. EssentialsXSpawn was teleporting players to my hub world briefly, and Multiverse was setting their gamemode to adventure, allowing for this bug to occur at all. I can fix this on my end by using Multiverse to handle server spawn or disabling FancyDeath.

cervinakuy commented 3 months ago

Thanks for reporting. I was able to replicate this when only running KitPvP alone with FancyDeath enabled.

After debugging, I've determined this line is causing the problem: https://github.com/cervinakuy/KitPvP/blob/6954f42c2146122c50fa16707bb8b3a3a198a0a2/src/main/java/com/planetgallium/kitpvp/listener/DeathListener.java#L159

@D3adhkwen, you helped fix the original bug relating to the crafting inventory. How did you resolve this current issue as a result - did you change your original approach?

Xemorr commented 2 months ago

Thanks for reporting. I was able to replicate this when only running KitPvP alone with FancyDeath enabled.

After debugging, I've determined this line is causing the problem:

https://github.com/cervinakuy/KitPvP/blob/6954f42c2146122c50fa16707bb8b3a3a198a0a2/src/main/java/com/planetgallium/kitpvp/listener/DeathListener.java#L159

@D3adhkwen, you helped fix the original bug relating to the crafting inventory. How did you resolve this current issue as a result - did you change your original approach?

Hey cervina, I've encountered this issue on a server I'm running too. I assume it's the same issue - I've just removed that line for my local build in the mean time.