{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/comments/72305151","id":72305151,"diff_hunk":"@@ -0,0 +1,79 @@\n+=======================================\n+Accessing data of offline Users/Players \n+=======================================\n+\n+In almost every plugin it's necessary to get access to player information even when the player is offline.\n+Since ``Sponge.getServer().getPlayer()`` does only return Players who are online one needs to find another solution.\n+\n+Some plugins store the relevant data themselves and associate the user by using ``Sponge.getServer().getGameProfileManager()``.\n+But writing different code for offline and online users is not necessary:\n+\n+The Service Manager natively provides a service called ``UserStorageService`` which is capable of returning ``User`` instances for Players who are currently offline\n+And since the ``Player`` interface extends ``User`` a ``User`` can often be used the same way as the ``Player`` instance.\n+\n+For example:\n+\n+* ``#hasPermission(String permission)`` is available from both instances.\n+\n+Code Example\n+----------------------------------\n+\n+Getting a User instance is a few more lines more efford that getting a Player.","path":"source/plugin/offline-userplayer-data.rst","position":21,"original_position":21,"commit_id":"e00796c63c9b739f4994d3cee49ed2931f874aec","original_commit_id":"e00796c63c9b739f4994d3cee49ed2931f874aec","user":{"login":"MarkL4YG","id":8037924,"avatar_url":"https://avatars.githubusercontent.com/u/8037924?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkL4YG","html_url":"https://github.com/MarkL4YG","followers_url":"https://api.github.com/users/MarkL4YG/followers","following_url":"https://api.github.com/users/MarkL4YG/following{/other_user}","gists_url":"https://api.github.com/users/MarkL4YG/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkL4YG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkL4YG/subscriptions","organizations_url":"https://api.github.com/users/MarkL4YG/orgs","repos_url":"https://api.github.com/users/MarkL4YG/repos","events_url":"https://api.github.com/users/MarkL4YG/events{/privacy}","received_events_url":"https://api.github.com/users/MarkL4YG/received_events","type":"User","site_admin":false},"body":"Hmm, wanted to get some sort of \"flow\" through the doc, but yeah, this is unnecessary.","created_at":"2016-07-26T18:08:49Z","updated_at":"2016-07-26T18:08:49Z","html_url":"https://github.com/SpongePowered/SpongeDocs/pull/519#discussion_r72305151","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/comments/72305151"},"html":{"href":"https://github.com/SpongePowered/SpongeDocs/pull/519#discussion_r72305151"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519","id":78874759,"html_url":"https://github.com/SpongePowered/SpongeDocs/pull/519","diff_url":"https://github.com/SpongePowered/SpongeDocs/pull/519.diff","patch_url":"https://github.com/SpongePowered/SpongeDocs/pull/519.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/519","number":519,"state":"open","locked":false,"title":"Documentation of UserStorageService and accessing offline user information","user":{"login":"MarkL4YG","id":8037924,"avatar_url":"https://avatars.githubusercontent.com/u/8037924?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkL4YG","html_url":"https://github.com/MarkL4YG","followers_url":"https://api.github.com/users/MarkL4YG/followers","following_url":"https://api.github.com/users/MarkL4YG/following{/other_user}","gists_url":"https://api.github.com/users/MarkL4YG/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkL4YG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkL4YG/subscriptions","organizations_url":"https://api.github.com/users/MarkL4YG/orgs","repos_url":"https://api.github.com/users/MarkL4YG/repos","events_url":"https://api.github.com/users/MarkL4YG/events{/privacy}","received_events_url":"https://api.github.com/users/MarkL4YG/received_events","type":"User","site_admin":false},"body":"As proposed in #518 here's my possible documentation about the existence of UserStorageService and accessing data for offline players.\r\nHope this helps :)","created_at":"2016-07-26T15:38:37Z","updated_at":"2016-07-26T18:08:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a006ac39841fc7c53fc8743540238641dd7eaadd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/519/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/statuses/e00796c63c9b739f4994d3cee49ed2931f874aec","head":{"label":"MarkL4YG:master","ref":"master","sha":"e00796c63c9b739f4994d3cee49ed2931f874aec","user":{"login":"MarkL4YG","id":8037924,"avatar_url":"https://avatars.githubusercontent.com/u/8037924?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkL4YG","html_url":"https://github.com/MarkL4YG","followers_url":"https://api.github.com/users/MarkL4YG/followers","following_url":"https://api.github.com/users/MarkL4YG/following{/other_user}","gists_url":"https://api.github.com/users/MarkL4YG/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkL4YG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkL4YG/subscriptions","organizations_url":"https://api.github.com/users/MarkL4YG/orgs","repos_url":"https://api.github.com/users/MarkL4YG/repos","events_url":"https://api.github.com/users/MarkL4YG/events{/privacy}","received_events_url":"https://api.github.com/users/MarkL4YG/received_events","type":"User","site_admin":false},"repo":{"id":64157654,"name":"SpongeDocs","full_name":"MarkL4YG/SpongeDocs","owner":{"login":"MarkL4YG","id":8037924,"avatar_url":"https://avatars.githubusercontent.com/u/8037924?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkL4YG","html_url":"https://github.com/MarkL4YG","followers_url":"https://api.github.com/users/MarkL4YG/followers","following_url":"https://api.github.com/users/MarkL4YG/following{/other_user}","gists_url":"https://api.github.com/users/MarkL4YG/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkL4YG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkL4YG/subscriptions","organizations_url":"https://api.github.com/users/MarkL4YG/orgs","repos_url":"https://api.github.com/users/MarkL4YG/repos","events_url":"https://api.github.com/users/MarkL4YG/events{/privacy}","received_events_url":"https://api.github.com/users/MarkL4YG/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarkL4YG/SpongeDocs","description":"Documentation for Sponge and its Implementations","fork":true,"url":"https://api.github.com/repos/MarkL4YG/SpongeDocs","forks_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/forks","keys_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/teams","hooks_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/hooks","issue_events_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/issues/events{/number}","events_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/events","assignees_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/assignees{/user}","branches_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/branches{/branch}","tags_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/tags","blobs_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/statuses/{sha}","languages_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/languages","stargazers_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/stargazers","contributors_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/contributors","subscribers_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/subscribers","subscription_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/subscription","commits_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/contents/{+path}","compare_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/merges","archive_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/downloads","issues_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/issues{/number}","pulls_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/pulls{/number}","milestones_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/milestones{/number}","notifications_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/labels{/name}","releases_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/releases{/id}","deployments_url":"https://api.github.com/repos/MarkL4YG/SpongeDocs/deployments","created_at":"2016-07-25T18:18:21Z","updated_at":"2016-07-25T18:18:23Z","pushed_at":"2016-07-26T15:55:13Z","git_url":"git://github.com/MarkL4YG/SpongeDocs.git","ssh_url":"git@github.com:MarkL4YG/SpongeDocs.git","clone_url":"https://github.com/MarkL4YG/SpongeDocs.git","svn_url":"https://github.com/MarkL4YG/SpongeDocs","homepage":"","size":5279,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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:master","ref":"master","sha":"921a4b317f939679e12955fe16aa6639d1ac90ff","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":27024702,"name":"SpongeDocs","full_name":"SpongePowered/SpongeDocs","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/SpongeDocs","description":"Documentation for Sponge and its Implementations","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeDocs","forks_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/releases{/id}","deployments_url":"https://api.github.com/repos/SpongePowered/SpongeDocs/deployments","created_at":"2014-11-23T06:56:04Z","updated_at":"2016-06-16T02:23:56Z","pushed_at":"2016-07-26T15:55:13Z","git_url":"git://github.com/SpongePowered/SpongeDocs.git","ssh_url":"git@github.com:SpongePowered/SpongeDocs.git","clone_url":"https://github.com/SpongePowered/SpongeDocs.git","svn_url":"https://github.com/SpongePowered/SpongeDocs","homepage":"","size":6304,"stargazers_count":61,"watchers_count":61,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":59,"forks":68,"open_issues":59,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519"},"html":{"href":"https://github.com/SpongePowered/SpongeDocs/pull/519"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/519"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/issues/519/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/pulls/519/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeDocs/statuses/e00796c63c9b739f4994d3cee49ed2931f874aec"}}}}
{"actor":{"display_login":"MarkL4YG"}}