{"action":"created","comment":{"url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/comments/31825624","id":31825624,"diff_hunk":"@@ -49,5 +88,29 @@ else if (reason.equals(\"transfer\")){\n \t\t\tgm.invalidateCache(g.getName());\n \t\t}\n \t}\n+\t\n+\t@EventHandler(priority = EventPriority.HIGHEST)\n+\tpublic void onLogin(PlayerJoinEvent event){\n+\t\tMercuryPlugin.handler.sendMessage(\"all\", \"name_layer\", \"login \"+event.getPlayer().getDisplayName());\n+\t\tBukkit.getLogger().info(\"LOGIN\");\n+\t}\n+\t\n+\t@EventHandler(priority = EventPriority.HIGHEST)\n+\tpublic void onLogoff(PlayerQuitEvent event){\n+\t\tMercuryPlugin.handler.sendMessage(\"all\", \"name_layer\", \"logoff \"+event.getPlayer().getDisplayName());\n+\t\tBukkit.getLogger().info(\"LOGOFF\");\n+\t}\n \n+\t@Override\n+\tpublic void run() {\n+\t\tNameLayerPlugin nl = NameLayerPlugin.getInstance();\n+\t\tnl.isMercuryEnabled = Bukkit.getPluginManager().isPluginEnabled(\"Mercury\");\n+\t\tif (nl.isMercuryEnabled){\n+\t\t\tnl.getServer().getPluginManager().registerEvents(this, nl);","path":"src/vg/civcraft/mc/namelayer/listeners/MercuryMessageListener.java","position":96,"original_position":96,"commit_id":"0d0ff9a7155314e3aa32e826764427f4f1a97a48","original_commit_id":"0d0ff9a7155314e3aa32e826764427f4f1a97a48","user":{"login":"suirad","id":8798829,"avatar_url":"https://avatars.githubusercontent.com/u/8798829?v=3","gravatar_id":"","url":"https://api.github.com/users/suirad","html_url":"https://github.com/suirad","followers_url":"https://api.github.com/users/suirad/followers","following_url":"https://api.github.com/users/suirad/following{/other_user}","gists_url":"https://api.github.com/users/suirad/gists{/gist_id}","starred_url":"https://api.github.com/users/suirad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suirad/subscriptions","organizations_url":"https://api.github.com/users/suirad/orgs","repos_url":"https://api.github.com/users/suirad/repos","events_url":"https://api.github.com/users/suirad/events{/privacy}","received_events_url":"https://api.github.com/users/suirad/received_events","type":"User","site_admin":false},"body":"You want it to make another MercuryMessageListener? How come? Wouldn't nl.getServer().getPluginManager().registerEvents(this, nl); increment the reference so it wouldnt get gc'd when the runnable is over?","created_at":"2015-06-05T16:01:05Z","updated_at":"2015-06-05T16:01:05Z","html_url":"https://github.com/Civcraft/NameLayer/pull/112#discussion_r31825624","pull_request_url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112","_links":{"self":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/comments/31825624"},"html":{"href":"https://github.com/Civcraft/NameLayer/pull/112#discussion_r31825624"},"pull_request":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112"}}},"pull_request":{"url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112","id":37044563,"html_url":"https://github.com/Civcraft/NameLayer/pull/112","diff_url":"https://github.com/Civcraft/NameLayer/pull/112.diff","patch_url":"https://github.com/Civcraft/NameLayer/pull/112.patch","issue_url":"https://api.github.com/repos/Civcraft/NameLayer/issues/112","number":112,"state":"open","locked":false,"title":"Working version of NameLayer with Mercury","user":{"login":"suirad","id":8798829,"avatar_url":"https://avatars.githubusercontent.com/u/8798829?v=3","gravatar_id":"","url":"https://api.github.com/users/suirad","html_url":"https://github.com/suirad","followers_url":"https://api.github.com/users/suirad/followers","following_url":"https://api.github.com/users/suirad/following{/other_user}","gists_url":"https://api.github.com/users/suirad/gists{/gist_id}","starred_url":"https://api.github.com/users/suirad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suirad/subscriptions","organizations_url":"https://api.github.com/users/suirad/orgs","repos_url":"https://api.github.com/users/suirad/repos","events_url":"https://api.github.com/users/suirad/events{/privacy}","received_events_url":"https://api.github.com/users/suirad/received_events","type":"User","site_admin":false},"body":"Also added tracking of all online players for other plugins to utilize(civchat). I would appreciate someone testing the previously added mercury synced commands.\r\nAfter a review, this should be pull/Civtest ready.","created_at":"2015-06-05T15:55:22Z","updated_at":"2015-06-05T16:01:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"544753bbcb4563330f47c22426224ad0fa8e9133","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112/commits","review_comments_url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112/comments","review_comment_url":"https://api.github.com/repos/Civcraft/NameLayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Civcraft/NameLayer/issues/112/comments","statuses_url":"https://api.github.com/repos/Civcraft/NameLayer/statuses/0d0ff9a7155314e3aa32e826764427f4f1a97a48","head":{"label":"suirad:master","ref":"master","sha":"0d0ff9a7155314e3aa32e826764427f4f1a97a48","user":{"login":"suirad","id":8798829,"avatar_url":"https://avatars.githubusercontent.com/u/8798829?v=3","gravatar_id":"","url":"https://api.github.com/users/suirad","html_url":"https://github.com/suirad","followers_url":"https://api.github.com/users/suirad/followers","following_url":"https://api.github.com/users/suirad/following{/other_user}","gists_url":"https://api.github.com/users/suirad/gists{/gist_id}","starred_url":"https://api.github.com/users/suirad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suirad/subscriptions","organizations_url":"https://api.github.com/users/suirad/orgs","repos_url":"https://api.github.com/users/suirad/repos","events_url":"https://api.github.com/users/suirad/events{/privacy}","received_events_url":"https://api.github.com/users/suirad/received_events","type":"User","site_admin":false},"repo":{"id":36889111,"name":"NameLayer","full_name":"suirad/NameLayer","owner":{"login":"suirad","id":8798829,"avatar_url":"https://avatars.githubusercontent.com/u/8798829?v=3","gravatar_id":"","url":"https://api.github.com/users/suirad","html_url":"https://github.com/suirad","followers_url":"https://api.github.com/users/suirad/followers","following_url":"https://api.github.com/users/suirad/following{/other_user}","gists_url":"https://api.github.com/users/suirad/gists{/gist_id}","starred_url":"https://api.github.com/users/suirad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suirad/subscriptions","organizations_url":"https://api.github.com/users/suirad/orgs","repos_url":"https://api.github.com/users/suirad/repos","events_url":"https://api.github.com/users/suirad/events{/privacy}","received_events_url":"https://api.github.com/users/suirad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/suirad/NameLayer","description":"","fork":true,"url":"https://api.github.com/repos/suirad/NameLayer","forks_url":"https://api.github.com/repos/suirad/NameLayer/forks","keys_url":"https://api.github.com/repos/suirad/NameLayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/suirad/NameLayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/suirad/NameLayer/teams","hooks_url":"https://api.github.com/repos/suirad/NameLayer/hooks","issue_events_url":"https://api.github.com/repos/suirad/NameLayer/issues/events{/number}","events_url":"https://api.github.com/repos/suirad/NameLayer/events","assignees_url":"https://api.github.com/repos/suirad/NameLayer/assignees{/user}","branches_url":"https://api.github.com/repos/suirad/NameLayer/branches{/branch}","tags_url":"https://api.github.com/repos/suirad/NameLayer/tags","blobs_url":"https://api.github.com/repos/suirad/NameLayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/suirad/NameLayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/suirad/NameLayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/suirad/NameLayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/suirad/NameLayer/statuses/{sha}","languages_url":"https://api.github.com/repos/suirad/NameLayer/languages","stargazers_url":"https://api.github.com/repos/suirad/NameLayer/stargazers","contributors_url":"https://api.github.com/repos/suirad/NameLayer/contributors","subscribers_url":"https://api.github.com/repos/suirad/NameLayer/subscribers","subscription_url":"https://api.github.com/repos/suirad/NameLayer/subscription","commits_url":"https://api.github.com/repos/suirad/NameLayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/suirad/NameLayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/suirad/NameLayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/suirad/NameLayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/suirad/NameLayer/contents/{+path}","compare_url":"https://api.github.com/repos/suirad/NameLayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/suirad/NameLayer/merges","archive_url":"https://api.github.com/repos/suirad/NameLayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/suirad/NameLayer/downloads","issues_url":"https://api.github.com/repos/suirad/NameLayer/issues{/number}","pulls_url":"https://api.github.com/repos/suirad/NameLayer/pulls{/number}","milestones_url":"https://api.github.com/repos/suirad/NameLayer/milestones{/number}","notifications_url":"https://api.github.com/repos/suirad/NameLayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/suirad/NameLayer/labels{/name}","releases_url":"https://api.github.com/repos/suirad/NameLayer/releases{/id}","created_at":"2015-06-04T18:51:37Z","updated_at":"2015-06-04T18:51:42Z","pushed_at":"2015-06-05T15:53:25Z","git_url":"git://github.com/suirad/NameLayer.git","ssh_url":"git@github.com:suirad/NameLayer.git","clone_url":"https://github.com/suirad/NameLayer.git","svn_url":"https://github.com/suirad/NameLayer","homepage":"","size":1642,"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":"Civcraft:master","ref":"master","sha":"c101eac73356f326b483e41ee5242b3a541b3dcf","user":{"login":"Civcraft","id":3921874,"avatar_url":"https://avatars.githubusercontent.com/u/3921874?v=3","gravatar_id":"","url":"https://api.github.com/users/Civcraft","html_url":"https://github.com/Civcraft","followers_url":"https://api.github.com/users/Civcraft/followers","following_url":"https://api.github.com/users/Civcraft/following{/other_user}","gists_url":"https://api.github.com/users/Civcraft/gists{/gist_id}","starred_url":"https://api.github.com/users/Civcraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Civcraft/subscriptions","organizations_url":"https://api.github.com/users/Civcraft/orgs","repos_url":"https://api.github.com/users/Civcraft/repos","events_url":"https://api.github.com/users/Civcraft/events{/privacy}","received_events_url":"https://api.github.com/users/Civcraft/received_events","type":"Organization","site_admin":false},"repo":{"id":23901838,"name":"NameLayer","full_name":"Civcraft/NameLayer","owner":{"login":"Civcraft","id":3921874,"avatar_url":"https://avatars.githubusercontent.com/u/3921874?v=3","gravatar_id":"","url":"https://api.github.com/users/Civcraft","html_url":"https://github.com/Civcraft","followers_url":"https://api.github.com/users/Civcraft/followers","following_url":"https://api.github.com/users/Civcraft/following{/other_user}","gists_url":"https://api.github.com/users/Civcraft/gists{/gist_id}","starred_url":"https://api.github.com/users/Civcraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Civcraft/subscriptions","organizations_url":"https://api.github.com/users/Civcraft/orgs","repos_url":"https://api.github.com/users/Civcraft/repos","events_url":"https://api.github.com/users/Civcraft/events{/privacy}","received_events_url":"https://api.github.com/users/Civcraft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Civcraft/NameLayer","description":"","fork":true,"url":"https://api.github.com/repos/Civcraft/NameLayer","forks_url":"https://api.github.com/repos/Civcraft/NameLayer/forks","keys_url":"https://api.github.com/repos/Civcraft/NameLayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Civcraft/NameLayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Civcraft/NameLayer/teams","hooks_url":"https://api.github.com/repos/Civcraft/NameLayer/hooks","issue_events_url":"https://api.github.com/repos/Civcraft/NameLayer/issues/events{/number}","events_url":"https://api.github.com/repos/Civcraft/NameLayer/events","assignees_url":"https://api.github.com/repos/Civcraft/NameLayer/assignees{/user}","branches_url":"https://api.github.com/repos/Civcraft/NameLayer/branches{/branch}","tags_url":"https://api.github.com/repos/Civcraft/NameLayer/tags","blobs_url":"https://api.github.com/repos/Civcraft/NameLayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Civcraft/NameLayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Civcraft/NameLayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Civcraft/NameLayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Civcraft/NameLayer/statuses/{sha}","languages_url":"https://api.github.com/repos/Civcraft/NameLayer/languages","stargazers_url":"https://api.github.com/repos/Civcraft/NameLayer/stargazers","contributors_url":"https://api.github.com/repos/Civcraft/NameLayer/contributors","subscribers_url":"https://api.github.com/repos/Civcraft/NameLayer/subscribers","subscription_url":"https://api.github.com/repos/Civcraft/NameLayer/subscription","commits_url":"https://api.github.com/repos/Civcraft/NameLayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Civcraft/NameLayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Civcraft/NameLayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Civcraft/NameLayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Civcraft/NameLayer/contents/{+path}","compare_url":"https://api.github.com/repos/Civcraft/NameLayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Civcraft/NameLayer/merges","archive_url":"https://api.github.com/repos/Civcraft/NameLayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Civcraft/NameLayer/downloads","issues_url":"https://api.github.com/repos/Civcraft/NameLayer/issues{/number}","pulls_url":"https://api.github.com/repos/Civcraft/NameLayer/pulls{/number}","milestones_url":"https://api.github.com/repos/Civcraft/NameLayer/milestones{/number}","notifications_url":"https://api.github.com/repos/Civcraft/NameLayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Civcraft/NameLayer/labels{/name}","releases_url":"https://api.github.com/repos/Civcraft/NameLayer/releases{/id}","created_at":"2014-09-11T03:01:44Z","updated_at":"2015-05-02T17:48:25Z","pushed_at":"2015-06-05T15:55:22Z","git_url":"git://github.com/Civcraft/NameLayer.git","ssh_url":"git@github.com:Civcraft/NameLayer.git","clone_url":"https://github.com/Civcraft/NameLayer.git","svn_url":"https://github.com/Civcraft/NameLayer","homepage":null,"size":1642,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112"},"html":{"href":"https://github.com/Civcraft/NameLayer/pull/112"},"issue":{"href":"https://api.github.com/repos/Civcraft/NameLayer/issues/112"},"comments":{"href":"https://api.github.com/repos/Civcraft/NameLayer/issues/112/comments"},"review_comments":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112/comments"},"review_comment":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Civcraft/NameLayer/pulls/112/commits"},"statuses":{"href":"https://api.github.com/repos/Civcraft/NameLayer/statuses/0d0ff9a7155314e3aa32e826764427f4f1a97a48"}}}}