{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/22435799","id":22435799,"diff_hunk":"@@ -118,4 +122,92 @@\n      */\n     void clearTitle();\n \n+    /**\n+     * Gets the current value for the given {@link Statistic}.\n+     *\n+     * @param statistic The statistic to return\n+     * @return The current value for the given statistic, if a value is set yet.\n+     *         Optional.absent() otherwise\n+     */\n+    Optional<Long> getStatistic(Statistic statistic);\n+\n+    /**\n+     * Gets all {@link Statistic}s with their current values. Does not return\n+     * statistics that does not have a value set yet.\n+     *\n+     * @return A map containing all statistics with their current values.\n+     */\n+    Map<Statistic, Long> getStatistics();","path":"src/main/java/org/spongepowered/api/entity/player/Player.java","position":39,"original_position":39,"commit_id":"382a7a7894ffadb63870d0a89de657b63d4b63a9","original_commit_id":"382a7a7894ffadb63870d0a89de657b63d4b63a9","user":{"login":"Zidane","id":744482,"avatar_url":"https://avatars.githubusercontent.com/u/744482?v=3","gravatar_id":"","url":"https://api.github.com/users/Zidane","html_url":"https://github.com/Zidane","followers_url":"https://api.github.com/users/Zidane/followers","following_url":"https://api.github.com/users/Zidane/following{/other_user}","gists_url":"https://api.github.com/users/Zidane/gists{/gist_id}","starred_url":"https://api.github.com/users/Zidane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zidane/subscriptions","organizations_url":"https://api.github.com/users/Zidane/orgs","repos_url":"https://api.github.com/users/Zidane/repos","events_url":"https://api.github.com/users/Zidane/events{/privacy}","received_events_url":"https://api.github.com/users/Zidane/received_events","type":"User","site_admin":false},"body":"Is the map modifiable? You should state so.","created_at":"2015-01-04T01:02:47Z","updated_at":"2015-01-04T01:02:47Z","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/318#discussion_r22435799","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/22435799"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/318#discussion_r22435799"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318","id":26531806,"html_url":"https://github.com/SpongePowered/SpongeAPI/pull/318","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/318.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/318.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/318","number":318,"state":"open","locked":false,"title":"Statistics/Achievements API addition: Events + added getter + setters to Player","user":{"login":"ST-DDT","id":1579362,"avatar_url":"https://avatars.githubusercontent.com/u/1579362?v=3","gravatar_id":"","url":"https://api.github.com/users/ST-DDT","html_url":"https://github.com/ST-DDT","followers_url":"https://api.github.com/users/ST-DDT/followers","following_url":"https://api.github.com/users/ST-DDT/following{/other_user}","gists_url":"https://api.github.com/users/ST-DDT/gists{/gist_id}","starred_url":"https://api.github.com/users/ST-DDT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ST-DDT/subscriptions","organizations_url":"https://api.github.com/users/ST-DDT/orgs","repos_url":"https://api.github.com/users/ST-DDT/repos","events_url":"https://api.github.com/users/ST-DDT/events{/privacy}","received_events_url":"https://api.github.com/users/ST-DDT/received_events","type":"User","site_admin":false},"body":"**Helper PR for:** https://github.com/SpongePowered/SpongeAPI/pull/220\r\nThere is another PR for getting `Statistic`s and `StatisticType`s: https://github.com/SpongePowered/SpongeAPI/pull/317\r\n\r\nAdded Events\r\n- `GrantAchievementEvent`\r\n- `StatisticChangeEvent`\r\n  - `StatisticChange`\r\n    - `StatisticChangeType` (`ADD`, `SET`, `RESET`)\r\n\r\nAdded methods to `Player`\r\n- get, set, add, reset, getAll, resetAll `Statistic`s\r\n- has, grant, revoke, revokeAll `Achievement`s\r\n\r\nThis PR assumes, that there are only `Statistic`s that use `Long` values.\r\n\r\n**TBD**\r\n* Remove `StatisticChangeType` / call event only for `ADD` and not for plugins.\r\n* `StatisticChangeEvent` allow `StatisticChange`s to be added by plugins, so that they can be part of the event handling process and are only applied at the end of the event handling process if the event is not cancelled `Iterable`->`Collection`\r\n* Replace `StatisticChange` by an interface\r\n* Move methods from `Player` (online) to `User` (offline)\r\n* More events that extends `StatisticChangeEvent`\r\n","created_at":"2014-12-23T20:57:09Z","updated_at":"2015-01-04T01:02:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91edb849dd0ee64108a75a046406ac5761de2ebc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/{number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/318/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/382a7a7894ffadb63870d0a89de657b63d4b63a9","head":{"label":"ST-DDT:feature/statsChange","ref":"feature/statsChange","sha":"382a7a7894ffadb63870d0a89de657b63d4b63a9","user":{"login":"ST-DDT","id":1579362,"avatar_url":"https://avatars.githubusercontent.com/u/1579362?v=3","gravatar_id":"","url":"https://api.github.com/users/ST-DDT","html_url":"https://github.com/ST-DDT","followers_url":"https://api.github.com/users/ST-DDT/followers","following_url":"https://api.github.com/users/ST-DDT/following{/other_user}","gists_url":"https://api.github.com/users/ST-DDT/gists{/gist_id}","starred_url":"https://api.github.com/users/ST-DDT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ST-DDT/subscriptions","organizations_url":"https://api.github.com/users/ST-DDT/orgs","repos_url":"https://api.github.com/users/ST-DDT/repos","events_url":"https://api.github.com/users/ST-DDT/events{/privacy}","received_events_url":"https://api.github.com/users/ST-DDT/received_events","type":"User","site_admin":false},"repo":{"id":23807335,"name":"SpongeAPI","full_name":"ST-DDT/SpongeAPI","owner":{"login":"ST-DDT","id":1579362,"avatar_url":"https://avatars.githubusercontent.com/u/1579362?v=3","gravatar_id":"","url":"https://api.github.com/users/ST-DDT","html_url":"https://github.com/ST-DDT","followers_url":"https://api.github.com/users/ST-DDT/followers","following_url":"https://api.github.com/users/ST-DDT/following{/other_user}","gists_url":"https://api.github.com/users/ST-DDT/gists{/gist_id}","starred_url":"https://api.github.com/users/ST-DDT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ST-DDT/subscriptions","organizations_url":"https://api.github.com/users/ST-DDT/orgs","repos_url":"https://api.github.com/users/ST-DDT/repos","events_url":"https://api.github.com/users/ST-DDT/events{/privacy}","received_events_url":"https://api.github.com/users/ST-DDT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ST-DDT/SpongeAPI","description":"A Minecraft plugin API (not including an implementation)","fork":true,"url":"https://api.github.com/repos/ST-DDT/SpongeAPI","forks_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/forks","keys_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/events","assignees_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/merges","archive_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/ST-DDT/SpongeAPI/releases{/id}","created_at":"2014-09-08T20:37:00Z","updated_at":"2014-12-30T23:11:43Z","pushed_at":"2014-12-30T23:11:41Z","git_url":"git://github.com/ST-DDT/SpongeAPI.git","ssh_url":"git@github.com:ST-DDT/SpongeAPI.git","clone_url":"https://github.com/ST-DDT/SpongeAPI.git","svn_url":"https://github.com/ST-DDT/SpongeAPI","homepage":"http://www.spongepowered.org/","size":1844,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SpongePowered:feature/stats","ref":"feature/stats","sha":"1a83dffb30247ff8cfd2ceea11470b3d56b1971e","user":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"repo":{"id":23770421,"name":"SpongeAPI","full_name":"SpongePowered/SpongeAPI","owner":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpongePowered/SpongeAPI","description":"A Minecraft plugin API","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeAPI","forks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/releases{/id}","created_at":"2014-09-07T20:39:25Z","updated_at":"2015-01-04T00:33:49Z","pushed_at":"2015-01-04T00:59:30Z","git_url":"git://github.com/SpongePowered/SpongeAPI.git","ssh_url":"git@github.com:SpongePowered/SpongeAPI.git","clone_url":"https://github.com/SpongePowered/SpongeAPI.git","svn_url":"https://github.com/SpongePowered/SpongeAPI","homepage":"http://www.spongepowered.org/","size":9076,"stargazers_count":697,"watchers_count":697,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":329,"mirror_url":null,"open_issues_count":38,"forks":329,"open_issues":38,"watchers":697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/318"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/318"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/382a7a7894ffadb63870d0a89de657b63d4b63a9"}}}}