{"action":"created","comment":{"url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments/38562380","id":38562380,"diff_hunk":"@@ -50,20 +54,27 @@ public void unload() {\n     public void onPlayerJoin(PlayerJoinEvent event) {\n         Player player = event.getPlayer();\n         Players.resetPlayer(player);\n-        Teams.getTeamById(\"observers\").get().add(player, true, false);\n-        event.getPlayer().getInventory().setItem(0, new ItemStack(Material.COMPASS));\n-        ItemStack howTo = Items.createBook(Material.WRITTEN_BOOK, 1, ChatColor.AQUA.toString() + ChatColor.BOLD + \"Coming Soon\", ChatColor.GOLD + \"CardinalPGM\");\n-        event.getPlayer().getInventory().setItem(1, howTo);\n-        if (!GameHandler.getGameHandler().getMatch().getState().equals(MatchState.ENDED)) {\n-            ItemStack picker = Items.createItem(Material.LEATHER_HELMET, 1, (short) 0,\n-                    ChatColor.GREEN + \"\" + ChatColor.BOLD + (GameHandler.getGameHandler().getMatch().getModules().getModule(ClassModule.class) != null ? new LocalizedChatMessage(ChatConstant.UI_TEAM_CLASS_SELECTION).getMessage(player.getLocale()) : new LocalizedChatMessage(ChatConstant.UI_TEAM_SELECTION).getMessage(player.getLocale())),\n-                    Arrays.asList(ChatColor.DARK_PURPLE + new LocalizedChatMessage(ChatConstant.UI_TEAM_JOIN_TIP).getMessage(player.getLocale())));\n-            player.getInventory().setItem(2, picker);\n-        }\n-        player.getInventory().setItem(3, Tutorial.getEmerald(player));\n-        if (player.hasPermission(\"tnt.defuse\")) {\n-            ItemStack shears = Items.createItem(Material.SHEARS, 1, (short) 0, ChatColor.RED + new LocalizedChatMessage(ChatConstant.UI_TNT_DEFUSER).getMessage(player.getLocale()));\n-            player.getInventory().setItem(5, shears);\n+        String playerName = event.getPlayer().getName();\n+        HashMap playersTeams = GameHandler.getGameHandler().getMatch().getModules().getModule(TeamRegisterModule.class).getPlayersTeams();\n+        if(playersTeams.containsKey(playerName)) {\n+            Teams.getTeamById(\"observers\").get().add(player, true, false);\n+            event.getPlayer().getInventory().setItem(0, new ItemStack(Material.COMPASS));","path":"src/main/java/in/twizmwaz/cardinal/module/modules/teamManager/TeamManagerModule.java","position":41,"original_position":41,"commit_id":"2127aad98316a174a35d8258f5d6e06ee64f3a3b","original_commit_id":"2127aad98316a174a35d8258f5d6e06ee64f3a3b","user":{"login":"angelitorb99","id":6134261,"avatar_url":"https://avatars.githubusercontent.com/u/6134261?v=3","gravatar_id":"","url":"https://api.github.com/users/angelitorb99","html_url":"https://github.com/angelitorb99","followers_url":"https://api.github.com/users/angelitorb99/followers","following_url":"https://api.github.com/users/angelitorb99/following{/other_user}","gists_url":"https://api.github.com/users/angelitorb99/gists{/gist_id}","starred_url":"https://api.github.com/users/angelitorb99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelitorb99/subscriptions","organizations_url":"https://api.github.com/users/angelitorb99/orgs","repos_url":"https://api.github.com/users/angelitorb99/repos","events_url":"https://api.github.com/users/angelitorb99/events{/privacy}","received_events_url":"https://api.github.com/users/angelitorb99/received_events","type":"User","site_admin":false},"body":"That isnt my code that was on Cardinal before","created_at":"2015-09-02T17:49:08Z","updated_at":"2015-09-02T17:49:08Z","html_url":"https://github.com/twizmwazin/CardinalPGM/pull/868#discussion_r38562380","pull_request_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868","_links":{"self":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments/38562380"},"html":{"href":"https://github.com/twizmwazin/CardinalPGM/pull/868#discussion_r38562380"},"pull_request":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868"}}},"pull_request":{"url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868","id":44019859,"html_url":"https://github.com/twizmwazin/CardinalPGM/pull/868","diff_url":"https://github.com/twizmwazin/CardinalPGM/pull/868.diff","patch_url":"https://github.com/twizmwazin/CardinalPGM/pull/868.patch","issue_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/868","number":868,"state":"open","locked":false,"title":"Add Team register","user":{"login":"angelitorb99","id":6134261,"avatar_url":"https://avatars.githubusercontent.com/u/6134261?v=3","gravatar_id":"","url":"https://api.github.com/users/angelitorb99","html_url":"https://github.com/angelitorb99","followers_url":"https://api.github.com/users/angelitorb99/followers","following_url":"https://api.github.com/users/angelitorb99/following{/other_user}","gists_url":"https://api.github.com/users/angelitorb99/gists{/gist_id}","starred_url":"https://api.github.com/users/angelitorb99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelitorb99/subscriptions","organizations_url":"https://api.github.com/users/angelitorb99/orgs","repos_url":"https://api.github.com/users/angelitorb99/repos","events_url":"https://api.github.com/users/angelitorb99/events{/privacy}","received_events_url":"https://api.github.com/users/angelitorb99/received_events","type":"User","site_admin":false},"body":"Adds a command /team <register/unregister> <ocnteam>. Downloads the team document and checks if the player is on that team. Also changes team alias and allows member to join until the team size is full.","created_at":"2015-09-02T17:32:02Z","updated_at":"2015-09-02T17:49:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76f18758b6b6d0935f285cf9490afe48de819630","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868/commits","review_comments_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868/comments","review_comment_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/868/comments","statuses_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/statuses/2127aad98316a174a35d8258f5d6e06ee64f3a3b","head":{"label":"angelitorb99:tmregister","ref":"tmregister","sha":"2127aad98316a174a35d8258f5d6e06ee64f3a3b","user":{"login":"angelitorb99","id":6134261,"avatar_url":"https://avatars.githubusercontent.com/u/6134261?v=3","gravatar_id":"","url":"https://api.github.com/users/angelitorb99","html_url":"https://github.com/angelitorb99","followers_url":"https://api.github.com/users/angelitorb99/followers","following_url":"https://api.github.com/users/angelitorb99/following{/other_user}","gists_url":"https://api.github.com/users/angelitorb99/gists{/gist_id}","starred_url":"https://api.github.com/users/angelitorb99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelitorb99/subscriptions","organizations_url":"https://api.github.com/users/angelitorb99/orgs","repos_url":"https://api.github.com/users/angelitorb99/repos","events_url":"https://api.github.com/users/angelitorb99/events{/privacy}","received_events_url":"https://api.github.com/users/angelitorb99/received_events","type":"User","site_admin":false},"repo":{"id":29695459,"name":"CardinalPGM","full_name":"angelitorb99/CardinalPGM","owner":{"login":"angelitorb99","id":6134261,"avatar_url":"https://avatars.githubusercontent.com/u/6134261?v=3","gravatar_id":"","url":"https://api.github.com/users/angelitorb99","html_url":"https://github.com/angelitorb99","followers_url":"https://api.github.com/users/angelitorb99/followers","following_url":"https://api.github.com/users/angelitorb99/following{/other_user}","gists_url":"https://api.github.com/users/angelitorb99/gists{/gist_id}","starred_url":"https://api.github.com/users/angelitorb99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelitorb99/subscriptions","organizations_url":"https://api.github.com/users/angelitorb99/orgs","repos_url":"https://api.github.com/users/angelitorb99/repos","events_url":"https://api.github.com/users/angelitorb99/events{/privacy}","received_events_url":"https://api.github.com/users/angelitorb99/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/angelitorb99/CardinalPGM","description":"This is the next PGM clone.","fork":true,"url":"https://api.github.com/repos/angelitorb99/CardinalPGM","forks_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/forks","keys_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/teams","hooks_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/hooks","issue_events_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/issues/events{/number}","events_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/events","assignees_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/assignees{/user}","branches_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/branches{/branch}","tags_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/tags","blobs_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/git/refs{/sha}","trees_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/statuses/{sha}","languages_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/languages","stargazers_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/stargazers","contributors_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/contributors","subscribers_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/subscribers","subscription_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/subscription","commits_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/commits{/sha}","git_commits_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/git/commits{/sha}","comments_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/comments{/number}","issue_comment_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/issues/comments{/number}","contents_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/contents/{+path}","compare_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/merges","archive_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/downloads","issues_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/issues{/number}","pulls_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/pulls{/number}","milestones_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/milestones{/number}","notifications_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/labels{/name}","releases_url":"https://api.github.com/repos/angelitorb99/CardinalPGM/releases{/id}","created_at":"2015-01-22T19:17:41Z","updated_at":"2015-01-22T19:17:42Z","pushed_at":"2015-09-02T17:38:18Z","git_url":"git://github.com/angelitorb99/CardinalPGM.git","ssh_url":"git@github.com:angelitorb99/CardinalPGM.git","clone_url":"https://github.com/angelitorb99/CardinalPGM.git","svn_url":"https://github.com/angelitorb99/CardinalPGM","homepage":null,"size":2686,"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":"twizmwazin:master","ref":"master","sha":"9722df9e4ffc6bfc44d34ccfc711a957c6a825a1","user":{"login":"twizmwazin","id":1341797,"avatar_url":"https://avatars.githubusercontent.com/u/1341797?v=3","gravatar_id":"","url":"https://api.github.com/users/twizmwazin","html_url":"https://github.com/twizmwazin","followers_url":"https://api.github.com/users/twizmwazin/followers","following_url":"https://api.github.com/users/twizmwazin/following{/other_user}","gists_url":"https://api.github.com/users/twizmwazin/gists{/gist_id}","starred_url":"https://api.github.com/users/twizmwazin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twizmwazin/subscriptions","organizations_url":"https://api.github.com/users/twizmwazin/orgs","repos_url":"https://api.github.com/users/twizmwazin/repos","events_url":"https://api.github.com/users/twizmwazin/events{/privacy}","received_events_url":"https://api.github.com/users/twizmwazin/received_events","type":"User","site_admin":false},"repo":{"id":26194169,"name":"CardinalPGM","full_name":"twizmwazin/CardinalPGM","owner":{"login":"twizmwazin","id":1341797,"avatar_url":"https://avatars.githubusercontent.com/u/1341797?v=3","gravatar_id":"","url":"https://api.github.com/users/twizmwazin","html_url":"https://github.com/twizmwazin","followers_url":"https://api.github.com/users/twizmwazin/followers","following_url":"https://api.github.com/users/twizmwazin/following{/other_user}","gists_url":"https://api.github.com/users/twizmwazin/gists{/gist_id}","starred_url":"https://api.github.com/users/twizmwazin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twizmwazin/subscriptions","organizations_url":"https://api.github.com/users/twizmwazin/orgs","repos_url":"https://api.github.com/users/twizmwazin/repos","events_url":"https://api.github.com/users/twizmwazin/events{/privacy}","received_events_url":"https://api.github.com/users/twizmwazin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/twizmwazin/CardinalPGM","description":"An open source implementation of the PGM spec","fork":false,"url":"https://api.github.com/repos/twizmwazin/CardinalPGM","forks_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/forks","keys_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/teams","hooks_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/hooks","issue_events_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/events{/number}","events_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/events","assignees_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/assignees{/user}","branches_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/branches{/branch}","tags_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/tags","blobs_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/git/refs{/sha}","trees_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/statuses/{sha}","languages_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/languages","stargazers_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/stargazers","contributors_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/contributors","subscribers_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/subscribers","subscription_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/subscription","commits_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/commits{/sha}","git_commits_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/git/commits{/sha}","comments_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/comments{/number}","issue_comment_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/comments{/number}","contents_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/contents/{+path}","compare_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/merges","archive_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/downloads","issues_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues{/number}","pulls_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls{/number}","milestones_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/milestones{/number}","notifications_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/labels{/name}","releases_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/releases{/id}","created_at":"2014-11-04T23:48:59Z","updated_at":"2015-08-27T19:12:52Z","pushed_at":"2015-09-02T17:48:50Z","git_url":"git://github.com/twizmwazin/CardinalPGM.git","ssh_url":"git@github.com:twizmwazin/CardinalPGM.git","clone_url":"https://github.com/twizmwazin/CardinalPGM.git","svn_url":"https://github.com/twizmwazin/CardinalPGM","homepage":"http://ci.twizmwaz.in/job/Cardinal/","size":7077,"stargazers_count":56,"watchers_count":56,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":74,"forks":52,"open_issues":74,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868"},"html":{"href":"https://github.com/twizmwazin/CardinalPGM/pull/868"},"issue":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/868"},"comments":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/868/comments"},"review_comments":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868/comments"},"review_comment":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/868/commits"},"statuses":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/statuses/2127aad98316a174a35d8258f5d6e06ee64f3a3b"}}}}