{"action":"created","issue":{"url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/22","repository_url":"https://api.github.com/repos/TechFortress/GriefPrevention","labels_url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/22/comments","events_url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/22/events","html_url":"https://github.com/TechFortress/GriefPrevention/issues/22","id":181770351,"number":22,"title":"Player last seen date not used for claim expiration","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":[{"url":"https://api.github.com/repos/TechFortress/GriefPrevention/labels/Accepting%20PRs","name":"Accepting PRs","color":"0e8a16"},{"url":"https://api.github.com/repos/TechFortress/GriefPrevention/labels/Improvement","name":"Improvement","color":"b60205"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/TechFortress/GriefPrevention/milestones/2","html_url":"https://github.com/TechFortress/GriefPrevention/milestones/15.4","labels_url":"https://api.github.com/repos/TechFortress/GriefPrevention/milestones/2/labels","id":2052973,"number":2,"title":"15.4","description":null,"creator":{"login":"RoboMWM","id":4625696,"avatar_url":"https://avatars.githubusercontent.com/u/4625696?v=3","gravatar_id":"","url":"https://api.github.com/users/RoboMWM","html_url":"https://github.com/RoboMWM","followers_url":"https://api.github.com/users/RoboMWM/followers","following_url":"https://api.github.com/users/RoboMWM/following{/other_user}","gists_url":"https://api.github.com/users/RoboMWM/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboMWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboMWM/subscriptions","organizations_url":"https://api.github.com/users/RoboMWM/orgs","repos_url":"https://api.github.com/users/RoboMWM/repos","events_url":"https://api.github.com/users/RoboMWM/events{/privacy}","received_events_url":"https://api.github.com/users/RoboMWM/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-10-06T17:35:43Z","updated_at":"2016-10-07T22:27:04Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-10-07T21:21:49Z","updated_at":"2016-10-08T02:03:20Z","closed_at":null,"body":"### What behaviour is expected:\r\nGP will use data from Bukkit to ascertain whether or not a player has been on within claim expiration limit. I propose the elimination of `PlayerData#getLastPlayed()` entirely - it shouldn't be used, as it isn't reliably updated. This [isn't a new issue](https://dev.bukkit.org/bukkit-plugins/grief-prevention/?comment=9186) and was supposed to be fixed in f935806b45. \r\n### What behaviour is observed:\r\nf935806b45 addressed only new player expiration, not expiration via configured time limit ([CleanupUnusedClaimTask.java#L64](https://github.com/TechFortress/GriefPrevention/blob/master/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimTask.java#L64)). In the event of an error ([several consecutive errors, actually](https://github.com/TechFortress/GriefPrevention/blob/master/src/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java#L604)), an empty new PlayerData is returned. The blank file counts as never having logged in, and all claims are deleted.\r\n### Steps/models to reproduce:\r\nConfigure GP run claim cleanup task and cause an exception reading the data file. To easily replicate, set file permissions so the user running the server cannot read the file.\r\n\r\n### Spigot/Craftbukkit/Paper and GriefPrevention version:\r\nSpigot git-Spigot-047f737-9558f31\r\nGriefPrevention version 15.3\r\n\r\n### Stack trace/error (if applicable)\r\nOnly vaguely relevant, my problem is not really with GP's handling of IO issues.\r\n\r\n```\r\njava.io.FileNotFoundException: plugins/GriefPreventionData/PlayerData/11a99891-8e4f-4711-a534-ab6499898ab1 (Too many open files)\r\n\tat java.io.FileInputStream.open0(Native Method)\r\n\tat java.io.FileInputStream.open(FileInputStream.java:195)\r\n\tat java.io.FileInputStream.<init>(FileInputStream.java:138)\r\n\tat com.google.common.io.Files$FileByteSource.openStream(Files.java:126)\r\n\tat com.google.common.io.Files$FileByteSource.openStream(Files.java:116)\r\n\tat com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:435)\r\n\tat com.google.common.io.CharSource.getInput(CharSource.java:94)\r\n\tat com.google.common.io.CharSource.getInput(CharSource.java:65)\r\n\tat com.google.common.io.CharStreams.readLines(CharStreams.java:344)\r\n\tat com.google.common.io.Files.readLines(Files.java:741)\r\n\tat com.google.common.io.Files.readLines(Files.java:712)\r\n\tat me.ryanhamshire.GriefPrevention.FlatFileDataStore.getPlayerDataFromStorage(FlatFileDataStore.java:613)\r\n\tat me.ryanhamshire.GriefPrevention.CleanupUnusedClaimPreTask.run(CleanupUnusedClaimPreTask.java:40)\r\n\tat org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:71)\r\n\tat org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\n### GriefPrevention config.yml (if applicable)\r\nMostly default, relevant section included:\r\n```\r\nGriefPrevention:\r\n  Claims:\r\n    Expiration:\r\n      ChestClaimDays: 7\r\n      UnusedClaimDays: 28\r\n      AllClaims:\r\n        DaysInactive: 150\r\n```\r\n\r\n### Plugin list (if applicable):\r\nI have a very good idea which plugin caused too many files to be open, I don't believe GP to be at fault."},"comment":{"url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/comments/252395889","html_url":"https://github.com/TechFortress/GriefPrevention/issues/22#issuecomment-252395889","issue_url":"https://api.github.com/repos/TechFortress/GriefPrevention/issues/22","id":252395889,"user":{"login":"RoboMWM","id":4625696,"avatar_url":"https://avatars.githubusercontent.com/u/4625696?v=3","gravatar_id":"","url":"https://api.github.com/users/RoboMWM","html_url":"https://github.com/RoboMWM","followers_url":"https://api.github.com/users/RoboMWM/followers","following_url":"https://api.github.com/users/RoboMWM/following{/other_user}","gists_url":"https://api.github.com/users/RoboMWM/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboMWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboMWM/subscriptions","organizations_url":"https://api.github.com/users/RoboMWM/orgs","repos_url":"https://api.github.com/users/RoboMWM/repos","events_url":"https://api.github.com/users/RoboMWM/events{/privacy}","received_events_url":"https://api.github.com/users/RoboMWM/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T02:03:20Z","updated_at":"2016-10-08T02:03:20Z","body":"> f935806 addressed only new player expiration, not expiration via configured time limit (CleanupUnusedClaimTask.java#L64). \r\n\r\nUmmmmm....\r\n\r\n`ownerInfo` is an offlinePlayer... unless you meant to link to another line?"}}
{"actor":{"display_login":"RoboMWM"}}