cervinakuy / KitPvP

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

Having kit menu open while respawning clears all kits #246

Open whizvox opened 5 months ago

whizvox commented 5 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 5 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 5 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 4 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.

jph4991 commented 3 weeks 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.

How do you go about removing that line? I have the KitPVP Plugin, but don't see where I can remove that line. I am still having this issue

Xemorr commented 3 weeks 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.

How do you go about removing that line? I have the KitPVP Plugin, but don't see where I can remove that line. I am still having this issue

I used a bytecode editor called Recaf, it's not for the faint of heart

D3adhkwen commented 2 weeks ago

Sorry for missing the messages here, been rather busy irl. I've managed to simulate the issue locally and came up with a fix. I sincerely apologize for missing out this handling in the initial fix.

jph4991 commented 2 weeks 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.

How do you go about removing that line? I have the KitPVP Plugin, but don't see where I can remove that line. I am still having this issue

I used a bytecode editor called Recaf, it's not for the faint of heart

Are you able to link your updated file with the fix for me?