{"action":"created","issue":{"url":"https://api.github.com/repos/lishid/OpenInv/issues/49","repository_url":"https://api.github.com/repos/lishid/OpenInv","labels_url":"https://api.github.com/repos/lishid/OpenInv/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/lishid/OpenInv/issues/49/comments","events_url":"https://api.github.com/repos/lishid/OpenInv/issues/49/events","html_url":"https://github.com/lishid/OpenInv/issues/49","id":164671034,"number":49,"title":"Improper caching causing dupes for offline players","user":{"login":"Jikoo","id":1353270,"avatar_url":"https://avatars.githubusercontent.com/u/1353270?v=3","gravatar_id":"","url":"https://api.github.com/users/Jikoo","html_url":"https://github.com/Jikoo","followers_url":"https://api.github.com/users/Jikoo/followers","following_url":"https://api.github.com/users/Jikoo/following{/other_user}","gists_url":"https://api.github.com/users/Jikoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Jikoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jikoo/subscriptions","organizations_url":"https://api.github.com/users/Jikoo/orgs","repos_url":"https://api.github.com/users/Jikoo/repos","events_url":"https://api.github.com/users/Jikoo/events{/privacy}","received_events_url":"https://api.github.com/users/Jikoo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-09T15:14:17Z","updated_at":"2016-11-26T05:57:43Z","closed_at":"2016-11-26T05:57:43Z","body":"Jikoo#10\n\n> This is a rare case. The Player loaded by the PlayerDataManager is a new object for SpecialEnderChest and SpecialPlayerInventory.\n> \n> To replicate dupe/overwrite issues:\n> 1. Open an offline player's inventory to cache it\n> 2. Open the offline player's ender chest to cache it\n> 3. Edit both inventories\n> 4. Restart server to clear cached inventories (cached inventories only clear when players go offline - some retention policy would be good, the current state is bad)\n> 5. Reopen inventories to see whichever was closed first reverted to previous state\n\nThe root cause is that the ISpecialEnderChest and ISpecialPlayerInventory implementations do not use the same Player object. That means that whichever saves last causes the other inventory to revert to its previous state, provided the actual Player does not log in before the server is restarted.\n"},"comment":{"url":"https://api.github.com/repos/lishid/OpenInv/issues/comments/263046179","html_url":"https://github.com/lishid/OpenInv/issues/49#issuecomment-263046179","issue_url":"https://api.github.com/repos/lishid/OpenInv/issues/49","id":263046179,"user":{"login":"Jikoo","id":1353270,"avatar_url":"https://avatars.githubusercontent.com/u/1353270?v=3","gravatar_id":"","url":"https://api.github.com/users/Jikoo","html_url":"https://github.com/Jikoo","followers_url":"https://api.github.com/users/Jikoo/followers","following_url":"https://api.github.com/users/Jikoo/following{/other_user}","gists_url":"https://api.github.com/users/Jikoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Jikoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jikoo/subscriptions","organizations_url":"https://api.github.com/users/Jikoo/orgs","repos_url":"https://api.github.com/users/Jikoo/repos","events_url":"https://api.github.com/users/Jikoo/events{/privacy}","received_events_url":"https://api.github.com/users/Jikoo/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T05:57:43Z","updated_at":"2016-11-26T05:57:43Z","body":"Fixed in 3.0.0"}}
{"actor":{"display_login":"Jikoo"}}