{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments/48699083","id":48699083,"diff_hunk":"@@ -140,6 +141,12 @@ public void registerListener(PluginContainer plugin, Object listenerObject) {\n         checkNotNull(plugin, \"plugin\");\n         checkNotNull(listenerObject, \"listener\");\n \n+        if (this.registeredListeners.contains(listenerObject)) {\n+            SpongeImpl.getLogger().warn(\"Plugin {} attempted to register an already registered listener ({})\", plugin.getId(),\n+                    listenerObject.getClass().getName());","path":"src/main/java/org/spongepowered/common/event/SpongeEventManager.java","position":14,"original_position":14,"commit_id":"4e9520c9360d3b76c4269bf7ae9f1173328baf99","original_commit_id":"4e9520c9360d3b76c4269bf7ae9f1173328baf99","user":{"login":"JBYoshi","id":12983479,"avatar_url":"https://avatars.githubusercontent.com/u/12983479?v=3","gravatar_id":"","url":"https://api.github.com/users/JBYoshi","html_url":"https://github.com/JBYoshi","followers_url":"https://api.github.com/users/JBYoshi/followers","following_url":"https://api.github.com/users/JBYoshi/following{/other_user}","gists_url":"https://api.github.com/users/JBYoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/JBYoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBYoshi/subscriptions","organizations_url":"https://api.github.com/users/JBYoshi/orgs","repos_url":"https://api.github.com/users/JBYoshi/repos","events_url":"https://api.github.com/users/JBYoshi/events{/privacy}","received_events_url":"https://api.github.com/users/JBYoshi/received_events","type":"User","site_admin":false},"body":"Would be nice to dump the stack trace as well. I have a private Bukkit plugin which (I believe) is registering a certain listener twice, and I don't know where the second registration is.","created_at":"2016-01-03T23:52:44Z","updated_at":"2016-01-03T23:52:44Z","html_url":"https://github.com/SpongePowered/SpongeCommon/pull/395#discussion_r48699083","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments/48699083"},"html":{"href":"https://github.com/SpongePowered/SpongeCommon/pull/395#discussion_r48699083"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395","id":54933073,"html_url":"https://github.com/SpongePowered/SpongeCommon/pull/395","diff_url":"https://github.com/SpongePowered/SpongeCommon/pull/395.diff","patch_url":"https://github.com/SpongePowered/SpongeCommon/pull/395.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/395","number":395,"state":"open","locked":false,"title":"Prevent registering an instance of a listener more than once","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 prevents a single instance of a listener from being registered many times.\r\n\r\nhttps://github.com/SpongePowered/SpongeCommon/issues/394\r\nhttps://github.com/SpongePowered/SpongeForge/issues/295\r\nhttps://github.com/SpongePowered/SpongeForge/issues/433\r\n","created_at":"2016-01-03T21:54:33Z","updated_at":"2016-01-03T23:52:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fec8e13d17611ee91e313fd2e42303a7da269a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/395/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/4e9520c9360d3b76c4269bf7ae9f1173328baf99","head":{"label":"kashike:fix/double","ref":"fix/double","sha":"4e9520c9360d3b76c4269bf7ae9f1173328baf99","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},"repo":{"id":38025166,"name":"SpongeCommon","full_name":"kashike/SpongeCommon","owner":{"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},"private":false,"html_url":"https://github.com/kashike/SpongeCommon","description":"Shared code between Sponge and SpongeVanilla","fork":true,"url":"https://api.github.com/repos/kashike/SpongeCommon","forks_url":"https://api.github.com/repos/kashike/SpongeCommon/forks","keys_url":"https://api.github.com/repos/kashike/SpongeCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kashike/SpongeCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kashike/SpongeCommon/teams","hooks_url":"https://api.github.com/repos/kashike/SpongeCommon/hooks","issue_events_url":"https://api.github.com/repos/kashike/SpongeCommon/issues/events{/number}","events_url":"https://api.github.com/repos/kashike/SpongeCommon/events","assignees_url":"https://api.github.com/repos/kashike/SpongeCommon/assignees{/user}","branches_url":"https://api.github.com/repos/kashike/SpongeCommon/branches{/branch}","tags_url":"https://api.github.com/repos/kashike/SpongeCommon/tags","blobs_url":"https://api.github.com/repos/kashike/SpongeCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kashike/SpongeCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kashike/SpongeCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/kashike/SpongeCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kashike/SpongeCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/kashike/SpongeCommon/languages","stargazers_url":"https://api.github.com/repos/kashike/SpongeCommon/stargazers","contributors_url":"https://api.github.com/repos/kashike/SpongeCommon/contributors","subscribers_url":"https://api.github.com/repos/kashike/SpongeCommon/subscribers","subscription_url":"https://api.github.com/repos/kashike/SpongeCommon/subscription","commits_url":"https://api.github.com/repos/kashike/SpongeCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/kashike/SpongeCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/kashike/SpongeCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/kashike/SpongeCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/kashike/SpongeCommon/contents/{+path}","compare_url":"https://api.github.com/repos/kashike/SpongeCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kashike/SpongeCommon/merges","archive_url":"https://api.github.com/repos/kashike/SpongeCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kashike/SpongeCommon/downloads","issues_url":"https://api.github.com/repos/kashike/SpongeCommon/issues{/number}","pulls_url":"https://api.github.com/repos/kashike/SpongeCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/kashike/SpongeCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/kashike/SpongeCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kashike/SpongeCommon/labels{/name}","releases_url":"https://api.github.com/repos/kashike/SpongeCommon/releases{/id}","created_at":"2015-06-25T03:14:56Z","updated_at":"2015-06-25T03:14:58Z","pushed_at":"2016-01-03T23:50:37Z","git_url":"git://github.com/kashike/SpongeCommon.git","ssh_url":"git@github.com:kashike/SpongeCommon.git","clone_url":"https://github.com/kashike/SpongeCommon.git","svn_url":"https://github.com/kashike/SpongeCommon","homepage":null,"size":7340,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"86b6fb4b36b7f5291b53198ea94ccd882a4840a0","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}","created_at":"2015-04-11T20:38:48Z","updated_at":"2015-12-29T23:27:02Z","pushed_at":"2016-01-03T23:50:37Z","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":12803,"stargazers_count":63,"watchers_count":63,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":64,"forks":63,"open_issues":64,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395"},"html":{"href":"https://github.com/SpongePowered/SpongeCommon/pull/395"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/395"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/395/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/pulls/395/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeCommon/statuses/4e9520c9360d3b76c4269bf7ae9f1173328baf99"}}}}