BattleKits

BattleKits

250k Downloads

Inventories don't update properly!

adammesa opened this issue ยท 4 comments

commented

The error

When switching from class 'A' to class 'B', whatever item slot the player has their "selection" on, is not updated properly. I.e., for one of the kits, if they're holding a sword in item spot 2, when changing to another kit, (which has a bow in that spot) the sword would stay, and the bow would be no where in sight.

Sometimes the inventory for the player doesn't update, but it shows as updated for everyone else... (I.e. they need to reconnect) or, other times where the item is not changed at all, and /invsee reveals that they still have the item...

Any help would be great!

commented

Known bug. Not sure why it occurs

commented

This doesn't occur in LiteKits which I'd suggest you use for the time being.

commented

Maybe you could try e.getPlayer().getInventory().clear();
Before supplyKit on PlayerInteractEvent? Lite kits has that bit. Even though you already clear their inventory on supplyKit, maybe you could give it a trie

commented

*try