Do you have this issue?
RoboMWM opened this issue ยท 11 comments
Also wondering if yours differs much (other than the UUID lookups mentioned in readme) since the plugin is being continued by another author.
This is weird. Looks like when the player comes online our swap to them is discounted. I wonder if it's due to the fact that the PlayerJoinEvent has always been fired too early. Either way, in retrospect, my "fix" is already handled earlier in the /openinv and /openender commands, though it's a good fix to have in case any other plugin uses OpenInv's API.
Not sure if you saw this PR lishid#41 - there seems to be other changes he made?
Did not, no. I was already planning on removing the save from SpecialPlayerInventory#setPlayerOffline, it was redundant.
To reproduce dupe bug:
- Open player inventory, player can be online or offline.
- Log player out and back in
- Have player make any inventory modifications and log out - dump items, etc. This is where the issue is - when a player comes back online, their inventory is no longer tied to the inventory being viewed.
- Close open inventory to set viewed inventory's contents to player's current
It's not as simple as just saving post-quit or I'd have it fixed by now. There's some issue with how I'm setting the item arrays. I've already added setting PlayerInventory.g, which was a missed case on my part from before, but that's apparently not enough.
Backporting the fix to all previous versions and making an interface change to reduce duplicate saves. There'll be a new release out shortly.
I would assume that that's still an issue in my fork, though I haven't noticed it myself. I'll look into what could be causing it if I can reproduce it.
My fork supports all past versions aside from pre-versioned-package CB, which the current version of OpenInv does not. I'm not up on what else the current author has done because of the awful commit messages and general horrible git usage, but as for other features, the updater is gone for obvious reasons and the OpenInv wand is removed because all it did was run the command for the user - there was no way to enable the wand without also allowing command access. I also do not support partial offline name matching, which was the main cause of lookup lag in the original.
Edit: Based on the ticket, I suspect that the player loader is loading player.dat even when the player is online. If that's it, it'll be a simple enough fix.
Thanks! Also wondering if possible to potentially disable the editing part, as I primarily use this to view inventories (considering that this bug did not require the inventory to be modified), as a mitigation for future issues.
That's permission-based, that feature's in the main branch as well.
OpenInv.editinv
for editing player inventories, OpenInv.editender
for ender chests.
Well I meant programmatically, since
this bug did not require the inventory to be modified
Unless it wouldn't occur for those who have OpenInv.editinv negated?
Ah, no saving entirely? More complex for me than the main branch because I removed all of the static access, but still probably quite doable. Created #6 for my own sanity