brunyman / MPDB

9 stars 2 forks source link

Items getting deleted when using /mpdb inv <name> #23

Open w1tcherrr opened 3 years ago

w1tcherrr commented 3 years ago

Hey!

For some reason your mySQL Player Data Bridge seems to sometimes randomly delete items when trying to take them out of an inventory. They also sometimes land in different inventory slots, where they aren't supposed to be (and delete the item that was there before).

I have a short clip showing this phenomenon that occurred yesterday. Link: https://www.youtube.com/watch?v=cESOVylva9Y&feature=youtu.be

In this specific case I tried to take this sword out of the inventory of a user and when I put it into my inventory and instead it seemed to get deleted. What actually happened was, that the item landed in the Head Slot of the players inventory which I had opened (and deleted his helmet).

The same thing has happened multiple times and sometimes in very different ways. For example I searched for a specific item and went through a ton of inventories and in the end of that my sword (which was in the left-most spot of my hotbar) was gone. It was for some reason completely deleted. This exact thing has happened two times with my sword.

How to reproduce: Basically shift around items in an inventory and at some point multiple of them will be deleted and sometimes land in armorslots.

Random idea what could cause this (probably not accurate): The only thing I could think about that could do this is the Data-Slots and Networking-Slots are somehow different (in the way that the data is stored and the way that it is sent between client and server, but I am by no means any kind of expert in that regard.) I just know that this can fix it: https://gist.github.com/ddevault/459a1691c3dd751db160. There is also some info about this here: https://wiki.vg/Inventory.

image