DenizenScript/Denizen

Citizens NPC with Mirrorskin causes extra PlayerQuitEvent to fire on a player kick

JeffP07 opened this issue · 1 comments

The output of /version on my server is: Purpur version git-Purpur-1308 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: d4afd4e on ver/1.17.1)
The output of /version denizen on my server is: Denizen version 1.2.1-SNAPSHOT (build 5713-DEV)

The issue is:
Using a Citizens NPC with mirrorskin creates a 2nd PlayerQuitEvent when the player is kicked. This does not occur if a player simply quits.

Steps to reproduce:

  1. Use Denizen with Citizens
  2. Create a Citizens NPC: /npc create Name
  3. Give that NPC mirrorskin: /npc mirrorskin
  4. Kick another player: /kick PlayerName

Outcome:
Two PlayerQuitEvents will be fired. Two quit messages will be sent to players because of that. I verified this by creating a plugin that prints a console message for PlayerKickEvents and PlayerQuitEvents. The plugin showed 1 PlayerKickEvent and 2 PlayerQuitEvents if a player was kicked. If the player leaves but is not kicked, the logging plugin showed 1 of each event being fired as expected.

Support is on Discord @ https://discord.gg/Q6pZGSR