{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1258","repository_url":"https://api.github.com/repos/SpongePowered/SpongeAPI","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1258/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1258/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1258/events","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1258","id":157307303,"number":1258,"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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-27T23:32:05Z","updated_at":"2016-05-28T13:55:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/1258","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1258","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/1258.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/1258.patch"},"body":"[API] (https://github.com/SpongePowered/SpongeAPI/pull/1258) | [Common](https://github.com/SpongePowered/SpongeCommon/pull/752)\r\n___\r\nCustom Inventories!\r\n\r\nListener for Testing:\r\n```java\r\n    @Listener\r\n    public void onChat(MessageChannelEvent.Chat event, @First Player player)\r\n    {\r\n        CustomInventory.Builder builder = null;\r\n        switch (event.getRawMessage().toPlain())\r\n        {\r\n            case \"chest\":\r\n                builder = CustomInventory.Chest.builder();\r\n                break;\r\n            case \"chest2\":\r\n                builder = CustomInventory.Chest.builder().size(6 * 9);\r\n                break;\r\n            case \"craft\":\r\n                builder = CustomInventory.Workbench.builder();\r\n                break;\r\n            case \"furnace\":\r\n                builder = CustomInventory.Furnace.builder();\r\n                break;\r\n            case \"dispenser\":\r\n                builder = CustomInventory.Dispenser.builder();\r\n                break;\r\n            case \"anvil\":\r\n                builder = CustomInventory.Anvil.builder();\r\n                break;\r\n            case \"ench\":\r\n                builder = CustomInventory.EnchantmentTable.builder();\r\n                break;\r\n            case \"brew\":\r\n                builder = CustomInventory.BrewingStand.builder();\r\n                break;\r\n            case \"beacon\":\r\n                builder = CustomInventory.Beacon.builder();\r\n                break;\r\n            case \"hopper\":\r\n                builder = CustomInventory.Hopper.builder();\r\n                break;\r\n            case \"dropper\":\r\n                builder = CustomInventory.Dispenser.builder();\r\n                break;\r\n        }\r\n        if (builder != null)\r\n        {\r\n            builder.title(event.getRawMessage());\r\n            player.sendMessage(Text.of(TextColors.GREEN, \"Open \", event.getRawMessage(), \"...\"));\r\n            player.openInventory(builder.build(), Cause.of(NamedCause.source(player)));\r\n        }\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/222309837","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/1258#issuecomment-222309837","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/1258","id":222309837,"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},"created_at":"2016-05-28T13:55:59Z","updated_at":"2016-05-28T13:55:59Z","body":"@Faithcaio \r\n\r\nSo, a step forward which is good. You should move the Builder methods out of CustomInventory and into the types. So the ChestInventory Builder should be in the ChestInventory interface as well as the static builder() method should live in the ChestInventory interface.\r\n\r\nThat way, I can literally call ChestInventory.builder().blah().build()"}}
{"actor":{"display_login":"Zidane"}}