Player has armor points without armor after exit o_O

Discussion in 'Spigot Plugin Development' started by SwiftAdviser, Jun 15, 2016.

  1. Hello! On my server running 1.9.4 I have a serious bug.

    I have self-written mobarena plugin. When player goes to the arena his inventory, health and all data saves in class "PlayerTempData". After that player chooses kit with armor and game starts. He can play or exit. If player exit his inventory restores from "PlayerTempData" in PlayerQuitEvent. And in the next login he should have all his data. But, if the player hasn't armor in tempData, after login he has nothing in armor slots (like it must be) and he has armor points of armor from choosen kit on the arena!

    I tried to make setArmorContents(null) in JoinEvent and in QuitEvent. This didn't help.

    So my players has diamond invisible armor, it is so funny, but in pvp arena it is very imbalance thing.

    Help, please. I googled so many times but without any sense. Or I should create issue in the spigot bug tracker?
  2. Have you checked the player's Armor NBT tag ?