{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments/64990662","id":64990662,"diff_hunk":"@@ -0,0 +1,194 @@\n+/*\n+ * This file is part of Sponge, licensed under the MIT License (MIT).\n+ *\n+ * Copyright (c) SpongePowered <https://www.spongepowered.org>\n+ * Copyright (c) contributors\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+package org.spongepowered.common.item.inventory.custom;\n+\n+import net.minecraft.entity.player.EntityPlayer;\n+import net.minecraft.entity.player.InventoryPlayer;\n+import net.minecraft.inventory.Container;\n+import net.minecraft.inventory.IInventory;\n+import net.minecraft.inventory.InventoryBasic;\n+import net.minecraft.item.ItemStack;\n+import net.minecraft.util.IChatComponent;\n+import net.minecraft.world.IInteractionObject;\n+import org.spongepowered.api.text.Text;\n+import org.spongepowered.api.text.TranslatableText;\n+import org.spongepowered.common.text.SpongeTexts;\n+\n+public abstract class SpongeCustomInventory implements IInteractionObject, IInventory {\n+\n+    private InventoryBasic inv;\n+    private Text displayName;\n+    private SpongeCustomInventoryBuilder.CustomContainerProvider containerProvider;\n+    private String guiID;\n+\n+    public SpongeCustomInventory(Text title, int slotCount, SpongeCustomInventoryBuilder.CustomContainerProvider containerProvider, String guiID) {\n+        boolean isTranslation = title instanceof TranslatableText;\n+        this.inv = new InventoryBasic(isTranslation ? ((TranslatableText) title).getTranslation().getId() : title.toPlain(), !isTranslation,\n+                slotCount);\n+        this.displayName = title;\n+        this.containerProvider = containerProvider;\n+        this.guiID = guiID;\n+    }\n+\n+    @Override\n+    public Container createContainer(InventoryPlayer inventory, EntityPlayer player) {\n+        return this.containerProvider.get(this, inventory, player);\n+    }\n+\n+    @Override\n+    public String getGuiID() {\n+        return guiID;\n+    }\n+\n+\n+    public IChatComponent getDisplayName() {\n+        return SpongeTexts.toComponent(displayName);","path":"src/main/java/org/spongepowered/common/item/inventory/custom/SpongeCustomInventory.java","position":67,"original_position":67,"commit_id":"6ec44d01a2f92bc4bef54e75ade016a5abe841bf","original_commit_id":"6ec44d01a2f92bc4bef54e75ade016a5abe841bf","user":{"login":"kashike","id":5474071,"avatar_url":"https://avatars.githubusercontent.com/u/5474071?v=3","gravatar_id":"","url":"https://api.github.com/users/kashike","html_url":"https://github.com/kashike","followers_url":"https://api.github.com/users/kashike/followers","following_url":"https://api.github.com/users/kashike/following{/other_user}","gists_url":"https://api.github.com/users/kashike/gists{/gist_id}","starred_url":"https://api.github.com/users/kashike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashike/subscriptions","organizations_url":"https://api.github.com/users/kashike/orgs","repos_url":"https://api.github.com/users/kashike/repos","events_url":"https://api.github.com/users/kashike/events{/privacy}","received_events_url":"https://api.github.com/users/kashike/received_events","type":"User","site_admin":false},"body":"`this.`","created_at":"2016-05-28T16:01:17Z","updated_at":"2016-05-28T16:01:17Z","html_url":"https://github.com/SpongePowered/SpongeCommon/pull/752#discussion_r64990662","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments/64990662"},"html":{"href":"https://github.com/SpongePowered/SpongeCommon/pull/752#discussion_r64990662"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752","id":71784511,"html_url":"https://github.com/SpongePowered/SpongeCommon/pull/752","diff_url":"https://github.com/SpongePowered/SpongeCommon/pull/752.diff","patch_url":"https://github.com/SpongePowered/SpongeCommon/pull/752.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/752","number":752,"state":"open","locked":false,"title":"[WIP] Custom Inventories","user":{"login":"Faithcaio","id":1575592,"avatar_url":"https://avatars.githubusercontent.com/u/1575592?v=3","gravatar_id":"","url":"https://api.github.com/users/Faithcaio","html_url":"https://github.com/Faithcaio","followers_url":"https://api.github.com/users/Faithcaio/followers","following_url":"https://api.github.com/users/Faithcaio/following{/other_user}","gists_url":"https://api.github.com/users/Faithcaio/gists{/gist_id}","starred_url":"https://api.github.com/users/Faithcaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Faithcaio/subscriptions","organizations_url":"https://api.github.com/users/Faithcaio/orgs","repos_url":"https://api.github.com/users/Faithcaio/repos","events_url":"https://api.github.com/users/Faithcaio/events{/privacy}","received_events_url":"https://api.github.com/users/Faithcaio/received_events","type":"User","site_admin":false},"body":"[API] (https://github.com/SpongePowered/SpongeAPI/pull/1258) | [Common](https://github.com/SpongePowered/SpongeCommon/pull/752)\r\n___\r\nCustom Inventories!","created_at":"2016-05-27T23:32:05Z","updated_at":"2016-05-28T16:01:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44a71ce9cd15947ca85467ca0f0f9907a08af1b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/752/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/6ec44d01a2f92bc4bef54e75ade016a5abe841bf","head":{"label":"CubeEngine:feature/custominventory","ref":"feature/custominventory","sha":"6ec44d01a2f92bc4bef54e75ade016a5abe841bf","user":{"login":"CubeEngine","id":3989212,"avatar_url":"https://avatars.githubusercontent.com/u/3989212?v=3","gravatar_id":"","url":"https://api.github.com/users/CubeEngine","html_url":"https://github.com/CubeEngine","followers_url":"https://api.github.com/users/CubeEngine/followers","following_url":"https://api.github.com/users/CubeEngine/following{/other_user}","gists_url":"https://api.github.com/users/CubeEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/CubeEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubeEngine/subscriptions","organizations_url":"https://api.github.com/users/CubeEngine/orgs","repos_url":"https://api.github.com/users/CubeEngine/repos","events_url":"https://api.github.com/users/CubeEngine/events{/privacy}","received_events_url":"https://api.github.com/users/CubeEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":59867409,"name":"SpongeCommon","full_name":"CubeEngine/SpongeCommon","owner":{"login":"CubeEngine","id":3989212,"avatar_url":"https://avatars.githubusercontent.com/u/3989212?v=3","gravatar_id":"","url":"https://api.github.com/users/CubeEngine","html_url":"https://github.com/CubeEngine","followers_url":"https://api.github.com/users/CubeEngine/followers","following_url":"https://api.github.com/users/CubeEngine/following{/other_user}","gists_url":"https://api.github.com/users/CubeEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/CubeEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CubeEngine/subscriptions","organizations_url":"https://api.github.com/users/CubeEngine/orgs","repos_url":"https://api.github.com/users/CubeEngine/repos","events_url":"https://api.github.com/users/CubeEngine/events{/privacy}","received_events_url":"https://api.github.com/users/CubeEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CubeEngine/SpongeCommon","description":"Shared code between SpongeForge and SpongeVanilla","fork":true,"url":"https://api.github.com/repos/CubeEngine/SpongeCommon","forks_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/forks","keys_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/teams","hooks_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/hooks","issue_events_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/issues/events{/number}","events_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/events","assignees_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/assignees{/user}","branches_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/branches{/branch}","tags_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/tags","blobs_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/languages","stargazers_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/stargazers","contributors_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/contributors","subscribers_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/subscribers","subscription_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/subscription","commits_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/contents/{+path}","compare_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/merges","archive_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/downloads","issues_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/issues{/number}","pulls_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/labels{/name}","releases_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/releases{/id}","deployments_url":"https://api.github.com/repos/CubeEngine/SpongeCommon/deployments","created_at":"2016-05-27T22:59:38Z","updated_at":"2016-05-27T22:59:47Z","pushed_at":"2016-05-28T15:58:52Z","git_url":"git://github.com/CubeEngine/SpongeCommon.git","ssh_url":"git@github.com:CubeEngine/SpongeCommon.git","clone_url":"https://github.com/CubeEngine/SpongeCommon.git","svn_url":"https://github.com/CubeEngine/SpongeCommon","homepage":"","size":13009,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"aeafd12ca4871d577f9424798de742ee08f58222","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":33791453,"name":"SpongeCommon","full_name":"SpongePowered/SpongeCommon","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/SpongeCommon","description":"Shared code between SpongeForge and SpongeVanilla","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeCommon","forks_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/releases{/id}","deployments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/deployments","created_at":"2015-04-11T20:38:48Z","updated_at":"2016-05-25T12:01:28Z","pushed_at":"2016-05-28T15:58:52Z","git_url":"git://github.com/SpongePowered/SpongeCommon.git","ssh_url":"git@github.com:SpongePowered/SpongeCommon.git","clone_url":"https://github.com/SpongePowered/SpongeCommon.git","svn_url":"https://github.com/SpongePowered/SpongeCommon","homepage":"","size":18987,"stargazers_count":86,"watchers_count":86,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":99,"forks":82,"open_issues":99,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752"},"html":{"href":"https://github.com/SpongePowered/SpongeCommon/pull/752"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/752"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/752/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/752/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/6ec44d01a2f92bc4bef54e75ade016a5abe841bf"}}}}
{"actor":{"display_login":"kashike"}}