{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/54334325","id":54334325,"diff_hunk":"@@ -76,4 +90,53 @@\n      */\n     boolean isLoaded(String id);\n \n+    /**\n+     * Gets the id of the {@link Plugin}.\n+     *\n+     * @return The id\n+     */\n+    default String getId(Object plugin) {","path":"src/main/java/org/spongepowered/api/plugin/PluginManager.java","position":37,"original_position":37,"commit_id":"15a0feaf8d35f5554efc2b96f9bdb0d80770c0ad","original_commit_id":"15a0feaf8d35f5554efc2b96f9bdb0d80770c0ad","user":{"login":"windy1","id":755713,"avatar_url":"https://avatars.githubusercontent.com/u/755713?v=3","gravatar_id":"","url":"https://api.github.com/users/windy1","html_url":"https://github.com/windy1","followers_url":"https://api.github.com/users/windy1/followers","following_url":"https://api.github.com/users/windy1/following{/other_user}","gists_url":"https://api.github.com/users/windy1/gists{/gist_id}","starred_url":"https://api.github.com/users/windy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windy1/subscriptions","organizations_url":"https://api.github.com/users/windy1/orgs","repos_url":"https://api.github.com/users/windy1/repos","events_url":"https://api.github.com/users/windy1/events{/privacy}","received_events_url":"https://api.github.com/users/windy1/received_events","type":"User","site_admin":false},"body":"Purely for convenience. IMO the less verbose we can make these kind of things the better. Similar concept to the `Sponge` class really.","created_at":"2016-02-27T14:51:40Z","updated_at":"2016-02-27T14:51:40Z","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1088#discussion_r54334325","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/54334325"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/1088#discussion_r54334325"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088","id":60052281,"html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1088","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/1088.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/1088.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1088","number":1088,"state":"open","locked":false,"title":"[WIP] Localization API","user":{"login":"windy1","id":755713,"avatar_url":"https://avatars.githubusercontent.com/u/755713?v=3","gravatar_id":"","url":"https://api.github.com/users/windy1","html_url":"https://github.com/windy1","followers_url":"https://api.github.com/users/windy1/followers","following_url":"https://api.github.com/users/windy1/following{/other_user}","gists_url":"https://api.github.com/users/windy1/gists{/gist_id}","starred_url":"https://api.github.com/users/windy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windy1/subscriptions","organizations_url":"https://api.github.com/users/windy1/orgs","repos_url":"https://api.github.com/users/windy1/repos","events_url":"https://api.github.com/users/windy1/events{/privacy}","received_events_url":"https://api.github.com/users/windy1/received_events","type":"User","site_admin":false},"body":"[**API**](https://github.com/SpongePowered/SpongeAPI/pull/1088) | [Common](https://github.com/SpongePowered/SpongeCommon/pull/525) | [Forge](https://github.com/SpongePowered/SpongeForge/pull/549)\r\n\r\nThis PR adds a localization API to SpongeAPI among some other breaking changes. The `provideFirst(Class)` method has been added to ServiceManager to allow for extensible services and `getServiceManager` has been added to `PluginContainer` for internal services. In the context of localization, this allows plugins to register their own `Dictionary` and have it be received with `plugin.getServiceManager().provideFirst(Dictionary.class);` without the need to know the exact implementing class.\r\n\r\n----\r\n\r\n**Example usage:**\r\n\r\n```java\r\n@Listener\r\npublic void onGameStarted(GameStartedServerEvent event) {\r\n    DefaultPluginDictionary dict = new DefaultPluginDictionary(this, Locales.DEFAULT, configDir);\r\n    try {\r\n        dict.load();\r\n    } catch (IOException e) {\r\n        e.printStackTrace();\r\n    }\r\n    Sponge.getPluginManager().getServiceManager(this).setProvider(Cause.of(this), Dictionary.class, dict);\r\n}\r\n```\r\n\r\nThis will create a new dictionary that will first look for the dictionary file in `<configDir>/<pluginId>.dict` and then as a resource at `<pluginId>.dict`. Plugins are of course free to implement their localization through dictionaries however they want.\r\n\r\n**Example .dict file:**\r\n\r\n```\r\nen_US {\r\n    hello=\"Hello\"\r\n}\r\nen_GB {\r\n    hello=\"'Ello govna'\"\r\n}\r\n```\r\n\r\n```java\r\ndictionary.get(\"hello\").get(); // \"Hello\"\r\ndictionary.get(\"hello\", Locale.UK).get(); // \"'Ello govna'\"\r\n\r\n// alternatively\r\n\r\nText.get(this, \"hello\").get(); // Text{\"Hello\"}\r\nText.get(this, \"hello\", Locale.UK).get(); // Text{\"'Ello govna'\"}\r\n\r\n// localize for player's client locale\r\n\r\nText.get(this, \"hello\", player.getLocale()).get();\r\n```\r\n\r\n","created_at":"2016-02-20T16:15:57Z","updated_at":"2016-02-27T14:51:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fa53fea75e2e42aaaec07c9bfe1844a44d8b734","assignee":null,"milestone":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/5","html_url":"https://github.com/SpongePowered/SpongeAPI/milestones/Revision%204.0","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones/5/labels","id":1302145,"number":5,"title":"Revision 4.0","description":"This is the 4th release of SpongeAPI","creator":{"login":"gabizou","id":1203877,"avatar_url":"https://avatars.githubusercontent.com/u/1203877?v=3","gravatar_id":"","url":"https://api.github.com/users/gabizou","html_url":"https://github.com/gabizou","followers_url":"https://api.github.com/users/gabizou/followers","following_url":"https://api.github.com/users/gabizou/following{/other_user}","gists_url":"https://api.github.com/users/gabizou/gists{/gist_id}","starred_url":"https://api.github.com/users/gabizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabizou/subscriptions","organizations_url":"https://api.github.com/users/gabizou/orgs","repos_url":"https://api.github.com/users/gabizou/repos","events_url":"https://api.github.com/users/gabizou/events{/privacy}","received_events_url":"https://api.github.com/users/gabizou/received_events","type":"User","site_admin":false},"open_issues":54,"closed_issues":13,"state":"open","created_at":"2015-09-12T04:50:57Z","updated_at":"2016-02-26T06:56:15Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1088/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/15a0feaf8d35f5554efc2b96f9bdb0d80770c0ad","head":{"label":"SpongePowered:feature/locale","ref":"feature/locale","sha":"15a0feaf8d35f5554efc2b96f9bdb0d80770c0ad","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}","deployments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/deployments","created_at":"2014-09-07T20:39:25Z","updated_at":"2016-02-26T05:01:49Z","pushed_at":"2016-02-27T14:36:01Z","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":21249,"stargazers_count":842,"watchers_count":842,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":345,"mirror_url":null,"open_issues_count":126,"forks":345,"open_issues":126,"watchers":842,"default_branch":"master"}},"base":{"label":"SpongePowered:bleeding","ref":"bleeding","sha":"f7c93a8afde3229b3e9215619e80127752f8fc65","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}","deployments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/deployments","created_at":"2014-09-07T20:39:25Z","updated_at":"2016-02-26T05:01:49Z","pushed_at":"2016-02-27T14:36:01Z","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":21249,"stargazers_count":842,"watchers_count":842,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":345,"mirror_url":null,"open_issues_count":126,"forks":345,"open_issues":126,"watchers":842,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/1088"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1088"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1088/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1088/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/15a0feaf8d35f5554efc2b96f9bdb0d80770c0ad"}}}}