{"action":"created","comment":{"url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments/38347210","id":38347210,"diff_hunk":"@@ -477,38 +456,77 @@ public void renderTeamTitle(TeamModule teamModule) {\n         currentScore++;\n     }\n \n-    public void renderTeamScore(ScoreModule score) {\n-        TeamModule teamModule = score.getTeam();\n-        Team team = scoreboard.getTeam(teamModule.getId() + \"-s\");\n-        team.setPrefix(teamModule.getColor() + Strings.trimTo(teamModule.getName(), 0, 14));\n-        team.setSuffix(Strings.trimTo(teamModule.getName(), 14, 30));\n-        if (team.getEntries().size() > 0) {\n-            setScore(objective, new ArrayList<>(team.getEntries()).get(0), score.getScore());\n-        } else {\n-            String name = teamModule.getColor() + \"\";\n-            while (used.contains(name)) {\n-                name = teamModule.getColor() + name;\n+    public void renderTeamScore() {\n+        List<String> fullNames = new ArrayList<>();\n+        for (ScoreModule score : GameHandler.getGameHandler().getMatch().getModules().getModules(ScoreModule.class)){\n+            if (score.getMax() != 0){\n+                fullNames.add(score.getScore() + \"\" + ChatColor.DARK_GRAY + \"/\" + ChatColor.GRAY + score.getMax() + \" \" + score.getTeam().getCompleteName());\n+            } else {\n+                fullNames.add(score.getScore() + \" \" + score.getTeam().getCompleteName());\n             }\n-            team.addEntry(name);\n-            setScore(objective, name, score.getScore());\n-            used.add(name);\n+        }\n+        java.util.Collections.sort(fullNames, new Comparator<String>(){\n+            public int compare(String str1, String str2){\n+                String[] split1 = (str1.contains(\"/\") ? str1.split(\"\\u00a7\",2) : str1.split(\" \",2));\n+                String[] split2 = (str2.contains(\"/\") ? str2.split(\"\\u00a7\",2) : str2.split(\" \",2));\n+                int int1 = Integer.parseInt(split1[0]);\n+                int int2 = Integer.parseInt(split2[0]);\n+                return int1 - int2;\n+                // -1 = str1 < str2\n+                // 0 = str1 = str2\n+                // 1 = str1 > str2\n+            }\n+        });\n+        for (int i = 0; i < fullNames.size(); i++) {\n+            Bukkit.getServer().getConsoleSender().sendMessage(i + \": \" + fullNames.get(i));\n+        }","path":"src/main/java/in/twizmwaz/cardinal/module/modules/scoreboard/ScoreboardModule.java","position":93,"original_position":93,"commit_id":"561e129175a74ce82080cffaa8632c4fb81a324d","original_commit_id":"561e129175a74ce82080cffaa8632c4fb81a324d","user":{"login":"Pablete1234","id":11789291,"avatar_url":"https://avatars.githubusercontent.com/u/11789291?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablete1234","html_url":"https://github.com/Pablete1234","followers_url":"https://api.github.com/users/Pablete1234/followers","following_url":"https://api.github.com/users/Pablete1234/following{/other_user}","gists_url":"https://api.github.com/users/Pablete1234/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablete1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablete1234/subscriptions","organizations_url":"https://api.github.com/users/Pablete1234/orgs","repos_url":"https://api.github.com/users/Pablete1234/repos","events_url":"https://api.github.com/users/Pablete1234/events{/privacy}","received_events_url":"https://api.github.com/users/Pablete1234/received_events","type":"User","site_admin":false},"body":"debug code, i'll remove that","created_at":"2015-08-31T19:07:08Z","updated_at":"2015-08-31T19:07:08Z","html_url":"https://github.com/twizmwazin/CardinalPGM/pull/861#discussion_r38347210","pull_request_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861","_links":{"self":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments/38347210"},"html":{"href":"https://github.com/twizmwazin/CardinalPGM/pull/861#discussion_r38347210"},"pull_request":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861"}}},"pull_request":{"url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861","id":43728538,"html_url":"https://github.com/twizmwazin/CardinalPGM/pull/861","diff_url":"https://github.com/twizmwazin/CardinalPGM/pull/861.diff","patch_url":"https://github.com/twizmwazin/CardinalPGM/pull/861.patch","issue_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/861","number":861,"state":"open","locked":false,"title":"Update tdm and blitz scoreboard","user":{"login":"Pablete1234","id":11789291,"avatar_url":"https://avatars.githubusercontent.com/u/11789291?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablete1234","html_url":"https://github.com/Pablete1234","followers_url":"https://api.github.com/users/Pablete1234/followers","following_url":"https://api.github.com/users/Pablete1234/following{/other_user}","gists_url":"https://api.github.com/users/Pablete1234/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablete1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablete1234/subscriptions","organizations_url":"https://api.github.com/users/Pablete1234/orgs","repos_url":"https://api.github.com/users/Pablete1234/repos","events_url":"https://api.github.com/users/Pablete1234/events{/privacy}","received_events_url":"https://api.github.com/users/Pablete1234/received_events","type":"User","site_admin":false},"body":"Needs to be done in 1 commit, (or atleast 1 by maestro and 1 by me)\r\n\r\nThis version:\r\n Sorts blitz and tdm scoreboards, the team with the most score goes first\r\n TDM max score is no longer displayed as \"--- MAX ---  250\", now it's \"10/250 Blue Team\"","created_at":"2015-08-31T03:09:27Z","updated_at":"2015-08-31T19:07:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5d76f2ec2d76b623cce5fd5b02b324ca5725418","assignee":{"login":"iEli2tyree011","id":5413757,"avatar_url":"https://avatars.githubusercontent.com/u/5413757?v=3","gravatar_id":"","url":"https://api.github.com/users/iEli2tyree011","html_url":"https://github.com/iEli2tyree011","followers_url":"https://api.github.com/users/iEli2tyree011/followers","following_url":"https://api.github.com/users/iEli2tyree011/following{/other_user}","gists_url":"https://api.github.com/users/iEli2tyree011/gists{/gist_id}","starred_url":"https://api.github.com/users/iEli2tyree011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iEli2tyree011/subscriptions","organizations_url":"https://api.github.com/users/iEli2tyree011/orgs","repos_url":"https://api.github.com/users/iEli2tyree011/repos","events_url":"https://api.github.com/users/iEli2tyree011/events{/privacy}","received_events_url":"https://api.github.com/users/iEli2tyree011/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861/commits","review_comments_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861/comments","review_comment_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/861/comments","statuses_url":"https://api.github.com/repos/twizmwazin/CardinalPGM/statuses/561e129175a74ce82080cffaa8632c4fb81a324d","head":{"label":"Pablete1234:tdmscore","ref":"tdmscore","sha":"561e129175a74ce82080cffaa8632c4fb81a324d","user":{"login":"Pablete1234","id":11789291,"avatar_url":"https://avatars.githubusercontent.com/u/11789291?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablete1234","html_url":"https://github.com/Pablete1234","followers_url":"https://api.github.com/users/Pablete1234/followers","following_url":"https://api.github.com/users/Pablete1234/following{/other_user}","gists_url":"https://api.github.com/users/Pablete1234/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablete1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablete1234/subscriptions","organizations_url":"https://api.github.com/users/Pablete1234/orgs","repos_url":"https://api.github.com/users/Pablete1234/repos","events_url":"https://api.github.com/users/Pablete1234/events{/privacy}","received_events_url":"https://api.github.com/users/Pablete1234/received_events","type":"User","site_admin":false},"repo":{"id":39295376,"name":"CardinalPGM","full_name":"Pablete1234/CardinalPGM","owner":{"login":"Pablete1234","id":11789291,"avatar_url":"https://avatars.githubusercontent.com/u/11789291?v=3","gravatar_id":"","url":"https://api.github.com/users/Pablete1234","html_url":"https://github.com/Pablete1234","followers_url":"https://api.github.com/users/Pablete1234/followers","following_url":"https://api.github.com/users/Pablete1234/following{/other_user}","gists_url":"https://api.github.com/users/Pablete1234/gists{/gist_id}","starred_url":"https://api.github.com/users/Pablete1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pablete1234/subscriptions","organizations_url":"https://api.github.com/users/Pablete1234/orgs","repos_url":"https://api.github.com/users/Pablete1234/repos","events_url":"https://api.github.com/users/Pablete1234/events{/privacy}","received_events_url":"https://api.github.com/users/Pablete1234/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pablete1234/CardinalPGM","description":"I bet that coffee tastes like fascism","fork":true,"url":"https://api.github.com/repos/Pablete1234/CardinalPGM","forks_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/forks","keys_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/teams","hooks_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/hooks","issue_events_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/issues/events{/number}","events_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/events","assignees_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/assignees{/user}","branches_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/branches{/branch}","tags_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/tags","blobs_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/statuses/{sha}","languages_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/languages","stargazers_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/stargazers","contributors_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/contributors","subscribers_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/subscribers","subscription_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/subscription","commits_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/contents/{+path}","compare_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/merges","archive_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/downloads","issues_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/issues{/number}","pulls_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/pulls{/number}","milestones_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/milestones{/number}","notifications_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/labels{/name}","releases_url":"https://api.github.com/repos/Pablete1234/CardinalPGM/releases{/id}","created_at":"2015-07-18T10:56:18Z","updated_at":"2015-07-18T10:56:18Z","pushed_at":"2015-08-31T14:38:05Z","git_url":"git://github.com/Pablete1234/CardinalPGM.git","ssh_url":"git@github.com:Pablete1234/CardinalPGM.git","clone_url":"https://github.com/Pablete1234/CardinalPGM.git","svn_url":"https://github.com/Pablete1234/CardinalPGM","homepage":"http://ci.twizmwaz.in/job/Cardinal/","size":2861,"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":"all-patches"}},"base":{"label":"twizmwazin:master","ref":"master","sha":"7733b31637756088da8cab4cfce3dafa2361e7ae","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-08-31T04:37:17Z","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":6435,"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":76,"forks":52,"open_issues":76,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861"},"html":{"href":"https://github.com/twizmwazin/CardinalPGM/pull/861"},"issue":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/861"},"comments":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/issues/861/comments"},"review_comments":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861/comments"},"review_comment":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/pulls/861/commits"},"statuses":{"href":"https://api.github.com/repos/twizmwazin/CardinalPGM/statuses/561e129175a74ce82080cffaa8632c4fb81a324d"}}}}