{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/27564922","id":27564922,"diff_hunk":"@@ -220,4 +220,10 @@\n      */\n     ConsoleSource getConsole();\n \n+    /**","path":"src/main/java/org/spongepowered/api/Server.java","position":4,"original_position":4,"commit_id":"0c1cfecbbb5f9dfa9b560fc9097cdecb7946b967","original_commit_id":"0c1cfecbbb5f9dfa9b560fc9097cdecb7946b967","user":{"login":"DDoS","id":1250647,"avatar_url":"https://avatars.githubusercontent.com/u/1250647?v=3","gravatar_id":"","url":"https://api.github.com/users/DDoS","html_url":"https://github.com/DDoS","followers_url":"https://api.github.com/users/DDoS/followers","following_url":"https://api.github.com/users/DDoS/following{/other_user}","gists_url":"https://api.github.com/users/DDoS/gists{/gist_id}","starred_url":"https://api.github.com/users/DDoS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDoS/subscriptions","organizations_url":"https://api.github.com/users/DDoS/orgs","repos_url":"https://api.github.com/users/DDoS/repos","events_url":"https://api.github.com/users/DDoS/events{/privacy}","received_events_url":"https://api.github.com/users/DDoS/received_events","type":"User","site_admin":false},"body":"This won't work.","created_at":"2015-04-01T12:39:15Z","updated_at":"2015-04-01T12:39:15Z","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/526#discussion_r27564922","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/27564922"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/526#discussion_r27564922"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526","id":32384114,"html_url":"https://github.com/SpongePowered/SpongeAPI/pull/526","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/526.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/526.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/526","number":526,"state":"open","locked":false,"title":"Instance Unification","user":{"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},"body":"Proposal for unified isFlowerPot detection\r\n=============\r\n\r\nWhilst it is well understood at this point that a well-specified and suitably future-proof API for Minecraft will need to be appropriately decoupled from Minecraft internals to withstand future changes to the underlying platform as effectively as possible, there are some aspects of the underlying platform which are intrinsically immutable and thus safe to propagate up to the API layer.\r\n\r\nIn many cases it is fully possible to achieve high levels of abstraction within the API, as demonstrated by the recent additions of the Inventory API and Item Data API. However there are still places where abstraction simply does not provide any measurable benefit to the end user, and adhering more faithfully to the internal architecture of the underlying Minecraft platform has no immediate or developer-facing drawbacks.\r\n\r\nWhere we can achieve some tangible improvement however is in homogenising developer-facing interfaces in order to provide a consistent and intuitive aspect-oriented development paradigm, reinforced by rigid adherance to integrated vertical software development disciplines.\r\n\r\n### The Chaos at the Heart of Minecraft\r\n\r\nWith Minecraft, what you see is not always what you get. Crowd-sourced names for internal API structures can often fall somewhat short of making any sense whatsoever, but still provide valuable insight for newcomers into Minecraft internals, albeit tainted by occasionally apocryphal or sometimes downright nonsensical assignment of meaning to something that the assignor didn't understand or couldn't be bothered to decipher. Nevertheless, these little curios persist in the deobfuscated Minecraft codebase, and their legacy is one of some entertainment and wry humor when the truth of a particular field or method's origins come to light.\r\n\r\nThe typical ways of dealing with these conflicts between the *status quo* and common sense resolve into two camps:\r\n\r\n* Argue about it pretty much forever\r\n* Accept the nonsense and move on\r\n\r\nAn example of the former is the most hotly contested field of all time `World.isRemote`, sorry I meant `World.isClient` or is that `World.isR...` okay, okay I'll stop. However one of the most notable examples of the latter is the somewhat controversially named `isFlowerPot` method in Minecraft's `Block` class.\r\n\r\nThis method and its somewhat peculiar naming was the subject of some discussion until a Mojangsta was nailed down and forced to cough up the original name, which turned out to be something like `handlesOwnClone`, however the charm of the original (kind of quirky and entertaining) `isFlowerPot` was just too strong, and the method maintains its apocryphal nomenclature to this day.\r\n\r\n### ClassLoading and You - a ~~song of ice and fire~~ soliloquy in five parts\r\n\r\nEveryone is aware that Sponge is powered by ~~black magic~~ Mixins, however Class Loading in Java is a complex topic and Mixins are unable to adequately solve every problem we might throw at them. Fundamental to the successful application of Mixins is the core idea that a mixin is used to implement some aspect of the defined API.\r\n\r\n`isFlowerPot` thus presents a problem. How can we adequately represent whether or not something is a flowerpot or not if we don't adequately encode this crucial information in the developer-facing portions of the API?\r\n\r\nThe answer is: define this information explicitly in each interface.\r\n\r\nTaking a purely java-based approach to solving this problem alleviates several issues which would otherwise be caused. Whilst we could of course inject the required code at runtime, this rapidly becomes a very expensive operation when we factor in the sheer number of classes involved, and also the potential conflicts it creates with other non-flowerpot-aware code.\r\n\r\nThe beauty of this extremely [elegant](https://github.com/SpongePowered/SpongeAPI/commits/hotfix/instance-checks?page=16) and efficient implementation approach is that it provides a unified and 100 percent intuitive way of determining whether literally **any** object is or is not a flowerpot at runtime, without introducing complex transformer logic or polluting existing mixins with unrelated code. This allows mixins to focus on their task of implementing literally everything, whilst `isFlowerPot` logic can be handled in pure Java at a fundamental level within both the API and the Sponge implementation.\r\n\r\nImplemented by [Sponge#217](https://github.com/SpongePowered/Sponge/pull/217)","created_at":"2015-04-01T02:20:51Z","updated_at":"2015-04-01T12:39:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bc890c6210d18e8ac146dd14ca0aa1e3223b5d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/526/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/0c1cfecbbb5f9dfa9b560fc9097cdecb7946b967","head":{"label":"SpongePowered:hotfix/instance-checks","ref":"hotfix/instance-checks","sha":"0c1cfecbbb5f9dfa9b560fc9097cdecb7946b967","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-04-01T02:28:47Z","pushed_at":"2015-04-01T02:39:37Z","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":18823,"stargazers_count":753,"watchers_count":753,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":340,"mirror_url":null,"open_issues_count":38,"forks":340,"open_issues":38,"watchers":753,"default_branch":"master"}},"base":{"label":"SpongePowered:master","ref":"master","sha":"e749d3d8037b101b525670a17432a3f57b66c520","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-04-01T02:28:47Z","pushed_at":"2015-04-01T02:39:37Z","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":18823,"stargazers_count":753,"watchers_count":753,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":340,"mirror_url":null,"open_issues_count":38,"forks":340,"open_issues":38,"watchers":753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/526"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/526"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/526/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/526/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/0c1cfecbbb5f9dfa9b560fc9097cdecb7946b967"}}}}