{"action":"created","comment":{"url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/comments/56257998","id":56257998,"diff_hunk":"@@ -0,0 +1,52 @@\n+package me.StevenLawson.TotalFreedomMod.Commands;\n+\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+import me.StevenLawson.TotalFreedomMod.TFM_PlayerData;\n+import me.StevenLawson.TotalFreedomMod.TFM_Util;\n+import org.apache.commons.lang3.StringUtils;\n+import org.bukkit.ChatColor;\n+import org.bukkit.command.Command;\n+import org.bukkit.command.CommandSender;\n+import org.bukkit.entity.Player;\n+\n+@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH)\n+@CommandParameters(description = \"Remove forbiiden colors, things from Tags.\", usage = \"/<command>\", aliases = \"tc\")\n+public class Command_tagclean extends TFM_Command\n+{\n+    private static final ChatColor[] BLOCKED = new ChatColor[]\n+    {\n+        ChatColor.MAGIC,\n+        ChatColor.STRIKETHROUGH,\n+        ChatColor.ITALIC,\n+        ChatColor.UNDERLINE,\n+        ChatColor.BLACK\n+    };\n+    private static final Pattern REGEX = Pattern.compile(\"\\\\u00A7[\" + StringUtils.join(BLOCKED, \"\") + \"]\");\n+\n+    @Override\n+    public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)\n+    {\n+        TFM_Util.adminAction(sender.getName(), \"Cleaning all tags.\", false);\n+\n+        for (final Player player : server.getOnlinePlayers())\n+        {\n+            final String playerName = player.getName();\n+            final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);\n+            final String Tag = playerdata.getTag();\n+            if (Tag != null && !Tag.isEmpty() && !Tag.equalsIgnoreCase(playerName))\n+            {\n+                final Matcher matcher = REGEX.matcher(Tag);\n+                if (matcher.find())\n+                {\n+                    final String newTag = matcher.replaceAll(\"\");","path":"src/me/StevenLawson/TotalFreedomMod/Commands/Command_tagclean.java","position":42,"original_position":42,"commit_id":"94c0d5da88e108eca5396d5e94c8bc5631a14e63","original_commit_id":"94c0d5da88e108eca5396d5e94c8bc5631a14e63","user":{"login":"Wild1145","id":2974377,"avatar_url":"https://avatars.githubusercontent.com/u/2974377?v=3","gravatar_id":"","url":"https://api.github.com/users/Wild1145","html_url":"https://github.com/Wild1145","followers_url":"https://api.github.com/users/Wild1145/followers","following_url":"https://api.github.com/users/Wild1145/following{/other_user}","gists_url":"https://api.github.com/users/Wild1145/gists{/gist_id}","starred_url":"https://api.github.com/users/Wild1145/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wild1145/subscriptions","organizations_url":"https://api.github.com/users/Wild1145/orgs","repos_url":"https://api.github.com/users/Wild1145/repos","events_url":"https://api.github.com/users/Wild1145/events{/privacy}","received_events_url":"https://api.github.com/users/Wild1145/received_events","type":"User","site_admin":false},"body":"Maybe call this clearTag or something like that? (Or clearedTag)??\r\n","created_at":"2016-03-15T23:18:47Z","updated_at":"2016-03-15T23:18:47Z","html_url":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565#discussion_r56257998","pull_request_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565","_links":{"self":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/comments/56257998"},"html":{"href":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565#discussion_r56257998"},"pull_request":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565"}}},"pull_request":{"url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565","id":62951893,"html_url":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565","diff_url":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565.diff","patch_url":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565.patch","issue_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/1565","number":1565,"state":"open","locked":false,"title":"Resolves #725, Create Command \"/tagclean\".","user":{"login":"Adamx120","id":16174206,"avatar_url":"https://avatars.githubusercontent.com/u/16174206?v=3","gravatar_id":"","url":"https://api.github.com/users/Adamx120","html_url":"https://github.com/Adamx120","followers_url":"https://api.github.com/users/Adamx120/followers","following_url":"https://api.github.com/users/Adamx120/following{/other_user}","gists_url":"https://api.github.com/users/Adamx120/gists{/gist_id}","starred_url":"https://api.github.com/users/Adamx120/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adamx120/subscriptions","organizations_url":"https://api.github.com/users/Adamx120/orgs","repos_url":"https://api.github.com/users/Adamx120/repos","events_url":"https://api.github.com/users/Adamx120/events{/privacy}","received_events_url":"https://api.github.com/users/Adamx120/received_events","type":"User","site_admin":false},"body":"Resolves #725 Created command \"/tagclean\" for cleaning forbiiden things from tags, same as the nickclean.\r\n\r\n- Testing: Done, Worked fine \r\n\r\nDUFC_Liam's PR is closed so i maked a new one.","created_at":"2016-03-15T18:10:47Z","updated_at":"2016-03-15T23:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d7db31732620e54f02b439e3ba8ed6bc3122807","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565/commits","review_comments_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565/comments","review_comment_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/1565/comments","statuses_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/statuses/94c0d5da88e108eca5396d5e94c8bc5631a14e63","head":{"label":"Adamx120:Adamx120-patch-3","ref":"Adamx120-patch-3","sha":"94c0d5da88e108eca5396d5e94c8bc5631a14e63","user":{"login":"Adamx120","id":16174206,"avatar_url":"https://avatars.githubusercontent.com/u/16174206?v=3","gravatar_id":"","url":"https://api.github.com/users/Adamx120","html_url":"https://github.com/Adamx120","followers_url":"https://api.github.com/users/Adamx120/followers","following_url":"https://api.github.com/users/Adamx120/following{/other_user}","gists_url":"https://api.github.com/users/Adamx120/gists{/gist_id}","starred_url":"https://api.github.com/users/Adamx120/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adamx120/subscriptions","organizations_url":"https://api.github.com/users/Adamx120/orgs","repos_url":"https://api.github.com/users/Adamx120/repos","events_url":"https://api.github.com/users/Adamx120/events{/privacy}","received_events_url":"https://api.github.com/users/Adamx120/received_events","type":"User","site_admin":false},"repo":{"id":53858396,"name":"TotalFreedomMod","full_name":"Adamx120/TotalFreedomMod","owner":{"login":"Adamx120","id":16174206,"avatar_url":"https://avatars.githubusercontent.com/u/16174206?v=3","gravatar_id":"","url":"https://api.github.com/users/Adamx120","html_url":"https://github.com/Adamx120","followers_url":"https://api.github.com/users/Adamx120/followers","following_url":"https://api.github.com/users/Adamx120/following{/other_user}","gists_url":"https://api.github.com/users/Adamx120/gists{/gist_id}","starred_url":"https://api.github.com/users/Adamx120/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adamx120/subscriptions","organizations_url":"https://api.github.com/users/Adamx120/orgs","repos_url":"https://api.github.com/users/Adamx120/repos","events_url":"https://api.github.com/users/Adamx120/events{/privacy}","received_events_url":"https://api.github.com/users/Adamx120/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Adamx120/TotalFreedomMod","description":"A server modification for the TotalFreedom server","fork":true,"url":"https://api.github.com/repos/Adamx120/TotalFreedomMod","forks_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/forks","keys_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/teams","hooks_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/hooks","issue_events_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/issues/events{/number}","events_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/events","assignees_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/assignees{/user}","branches_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/branches{/branch}","tags_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/tags","blobs_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/git/refs{/sha}","trees_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/statuses/{sha}","languages_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/languages","stargazers_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/stargazers","contributors_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/contributors","subscribers_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/subscribers","subscription_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/subscription","commits_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/commits{/sha}","git_commits_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/git/commits{/sha}","comments_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/comments{/number}","issue_comment_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/issues/comments{/number}","contents_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/contents/{+path}","compare_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/merges","archive_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/downloads","issues_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/issues{/number}","pulls_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/pulls{/number}","milestones_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/milestones{/number}","notifications_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/labels{/name}","releases_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/releases{/id}","deployments_url":"https://api.github.com/repos/Adamx120/TotalFreedomMod/deployments","created_at":"2016-03-14T13:28:22Z","updated_at":"2016-03-14T13:28:23Z","pushed_at":"2016-03-15T18:09:48Z","git_url":"git://github.com/Adamx120/TotalFreedomMod.git","ssh_url":"git@github.com:Adamx120/TotalFreedomMod.git","clone_url":"https://github.com/Adamx120/TotalFreedomMod.git","svn_url":"https://github.com/Adamx120/TotalFreedomMod","homepage":"http://totalfreedom.me/","size":3113,"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":"tfm43"}},"base":{"label":"TotalFreedom:tfm43","ref":"tfm43","sha":"21c0833f1460892fe4539531995d6d3cea9783bc","user":{"login":"TotalFreedom","id":3914775,"avatar_url":"https://avatars.githubusercontent.com/u/3914775?v=3","gravatar_id":"","url":"https://api.github.com/users/TotalFreedom","html_url":"https://github.com/TotalFreedom","followers_url":"https://api.github.com/users/TotalFreedom/followers","following_url":"https://api.github.com/users/TotalFreedom/following{/other_user}","gists_url":"https://api.github.com/users/TotalFreedom/gists{/gist_id}","starred_url":"https://api.github.com/users/TotalFreedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TotalFreedom/subscriptions","organizations_url":"https://api.github.com/users/TotalFreedom/orgs","repos_url":"https://api.github.com/users/TotalFreedom/repos","events_url":"https://api.github.com/users/TotalFreedom/events{/privacy}","received_events_url":"https://api.github.com/users/TotalFreedom/received_events","type":"Organization","site_admin":false},"repo":{"id":8891184,"name":"TotalFreedomMod","full_name":"TotalFreedom/TotalFreedomMod","owner":{"login":"TotalFreedom","id":3914775,"avatar_url":"https://avatars.githubusercontent.com/u/3914775?v=3","gravatar_id":"","url":"https://api.github.com/users/TotalFreedom","html_url":"https://github.com/TotalFreedom","followers_url":"https://api.github.com/users/TotalFreedom/followers","following_url":"https://api.github.com/users/TotalFreedom/following{/other_user}","gists_url":"https://api.github.com/users/TotalFreedom/gists{/gist_id}","starred_url":"https://api.github.com/users/TotalFreedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TotalFreedom/subscriptions","organizations_url":"https://api.github.com/users/TotalFreedom/orgs","repos_url":"https://api.github.com/users/TotalFreedom/repos","events_url":"https://api.github.com/users/TotalFreedom/events{/privacy}","received_events_url":"https://api.github.com/users/TotalFreedom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TotalFreedom/TotalFreedomMod","description":"A server modification for the TotalFreedom server","fork":false,"url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod","forks_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/forks","keys_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/teams","hooks_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/hooks","issue_events_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/events{/number}","events_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/events","assignees_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/assignees{/user}","branches_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/branches{/branch}","tags_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/tags","blobs_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/git/refs{/sha}","trees_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/statuses/{sha}","languages_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/languages","stargazers_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/stargazers","contributors_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/contributors","subscribers_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/subscribers","subscription_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/subscription","commits_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/commits{/sha}","git_commits_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/git/commits{/sha}","comments_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/comments{/number}","issue_comment_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/comments{/number}","contents_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/contents/{+path}","compare_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/merges","archive_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/downloads","issues_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues{/number}","pulls_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls{/number}","milestones_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/milestones{/number}","notifications_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/labels{/name}","releases_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/releases{/id}","deployments_url":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/deployments","created_at":"2013-03-19T22:42:36Z","updated_at":"2016-02-09T22:19:05Z","pushed_at":"2016-03-15T18:10:47Z","git_url":"git://github.com/TotalFreedom/TotalFreedomMod.git","ssh_url":"git@github.com:TotalFreedom/TotalFreedomMod.git","clone_url":"https://github.com/TotalFreedom/TotalFreedomMod.git","svn_url":"https://github.com/TotalFreedom/TotalFreedomMod","homepage":"http://totalfreedom.me/","size":4839,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":172,"mirror_url":null,"open_issues_count":227,"forks":172,"open_issues":227,"watchers":33,"default_branch":"tfm43"}},"_links":{"self":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565"},"html":{"href":"https://github.com/TotalFreedom/TotalFreedomMod/pull/1565"},"issue":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/1565"},"comments":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/issues/1565/comments"},"review_comments":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565/comments"},"review_comment":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/pulls/1565/commits"},"statuses":{"href":"https://api.github.com/repos/TotalFreedom/TotalFreedomMod/statuses/94c0d5da88e108eca5396d5e94c8bc5631a14e63"}}}}