{"action":"created","comment":{"url":"https://api.github.com/repos/Electroid/PGM/pulls/comments/363057979","pull_request_review_id":338372291,"id":363057979,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MzA1Nzk3OQ==","diff_hunk":"@@ -0,0 +1,70 @@\n+package tc.oc.pgm.commands;\n+\n+import app.ashcon.intake.Command;\n+import app.ashcon.intake.parametric.annotation.Text;\n+import net.md_5.bungee.api.ChatColor;\n+import org.bukkit.Bukkit;\n+import org.bukkit.command.CommandSender;\n+import org.bukkit.entity.Player;\n+import tc.oc.component.Component;\n+import tc.oc.component.types.PersonalizedText;\n+import tc.oc.component.types.PersonalizedTranslatable;\n+import tc.oc.named.NameStyle;\n+import tc.oc.pgm.api.Permissions;\n+import tc.oc.pgm.api.chat.Audience;\n+import tc.oc.pgm.api.match.Match;\n+import tc.oc.pgm.api.player.MatchPlayer;\n+import tc.oc.pgm.events.PlayerReportEvent;\n+\n+public class ModerationCommands {\n+\n+  @Command(\n+      aliases = {\"report\"},\n+      usage = \"<player> <reason>\",\n+      desc = \"Report a player who is breaking the rules\")\n+  public static void report(\n+      CommandSender commandSender,\n+      MatchPlayer matchPlayer,\n+      Match match,\n+      Player player,\n+      @Text String reason) {\n+    MatchPlayer accused = match.getPlayer(player);\n+    PlayerReportEvent event = new PlayerReportEvent(commandSender, accused, reason);\n+    match.callEvent(event);\n+\n+    if (event.isCancelled()) {\n+      if (event.getCancelMessage() != null) {\n+        commandSender.sendMessage(event.getCancelMessage());","path":"src/main/java/tc/oc/pgm/commands/ModerationCommands.java","position":37,"original_position":37,"commit_id":"a3db0124601ee75285f5ea55966065745a14d844","original_commit_id":"a3db0124601ee75285f5ea55966065745a14d844","user":{"login":"Electroid","id":3238291,"node_id":"MDQ6VXNlcjMyMzgyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3238291?v=4","gravatar_id":"","url":"https://api.github.com/users/Electroid","html_url":"https://github.com/Electroid","followers_url":"https://api.github.com/users/Electroid/followers","following_url":"https://api.github.com/users/Electroid/following{/other_user}","gists_url":"https://api.github.com/users/Electroid/gists{/gist_id}","starred_url":"https://api.github.com/users/Electroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Electroid/subscriptions","organizations_url":"https://api.github.com/users/Electroid/orgs","repos_url":"https://api.github.com/users/Electroid/repos","events_url":"https://api.github.com/users/Electroid/events{/privacy}","received_events_url":"https://api.github.com/users/Electroid/received_events","type":"User","site_admin":false},"body":"`matchPlayer.sendMessage`","created_at":"2020-01-04T22:16:10Z","updated_at":"2020-01-04T22:16:54Z","html_url":"https://github.com/Electroid/PGM/pull/180#discussion_r363057979","pull_request_url":"https://api.github.com/repos/Electroid/PGM/pulls/180","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/comments/363057979"},"html":{"href":"https://github.com/Electroid/PGM/pull/180#discussion_r363057979"},"pull_request":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/180"}}},"pull_request":{"url":"https://api.github.com/repos/Electroid/PGM/pulls/180","id":358809633,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU4ODA5NjMz","html_url":"https://github.com/Electroid/PGM/pull/180","diff_url":"https://github.com/Electroid/PGM/pull/180.diff","patch_url":"https://github.com/Electroid/PGM/pull/180.patch","issue_url":"https://api.github.com/repos/Electroid/PGM/issues/180","number":180,"state":"open","locked":false,"title":"Add basic report command with alert and event","user":{"login":"Pugzy","id":8608892,"node_id":"MDQ6VXNlcjg2MDg4OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/8608892?v=4","gravatar_id":"","url":"https://api.github.com/users/Pugzy","html_url":"https://github.com/Pugzy","followers_url":"https://api.github.com/users/Pugzy/followers","following_url":"https://api.github.com/users/Pugzy/following{/other_user}","gists_url":"https://api.github.com/users/Pugzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Pugzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pugzy/subscriptions","organizations_url":"https://api.github.com/users/Pugzy/orgs","repos_url":"https://api.github.com/users/Pugzy/repos","events_url":"https://api.github.com/users/Pugzy/events{/privacy}","received_events_url":"https://api.github.com/users/Pugzy/received_events","type":"User","site_admin":false},"body":"Adds a basic report command which takes a player and a reason. This triggers a `PlayerReportEvent` and sends a formatted message to all players with the permission `Permissions.ADMINCHAT`.\r\n\r\ne.g. image below (both player names are clickable, ignore my messed up flairs)\r\n\r\n![image](https://user-images.githubusercontent.com/8608892/71695923-7ee7cf00-2dab-11ea-85a8-34c61f92bd75.png)\r\n\r\nSigned-off-by: Pugzy <pugzy@mail.com>","created_at":"2020-01-02T22:03:38Z","updated_at":"2020-01-04T22:16:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ca5644fdb63562831484ff2fa12e4dd8d7433b8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Electroid/PGM/pulls/180/commits","review_comments_url":"https://api.github.com/repos/Electroid/PGM/pulls/180/comments","review_comment_url":"https://api.github.com/repos/Electroid/PGM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Electroid/PGM/issues/180/comments","statuses_url":"https://api.github.com/repos/Electroid/PGM/statuses/a3db0124601ee75285f5ea55966065745a14d844","head":{"label":"Pugzy:report-command","ref":"report-command","sha":"a3db0124601ee75285f5ea55966065745a14d844","user":{"login":"Pugzy","id":8608892,"node_id":"MDQ6VXNlcjg2MDg4OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/8608892?v=4","gravatar_id":"","url":"https://api.github.com/users/Pugzy","html_url":"https://github.com/Pugzy","followers_url":"https://api.github.com/users/Pugzy/followers","following_url":"https://api.github.com/users/Pugzy/following{/other_user}","gists_url":"https://api.github.com/users/Pugzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Pugzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pugzy/subscriptions","organizations_url":"https://api.github.com/users/Pugzy/orgs","repos_url":"https://api.github.com/users/Pugzy/repos","events_url":"https://api.github.com/users/Pugzy/events{/privacy}","received_events_url":"https://api.github.com/users/Pugzy/received_events","type":"User","site_admin":false},"repo":{"id":222314374,"node_id":"MDEwOlJlcG9zaXRvcnkyMjIzMTQzNzQ=","name":"PGM","full_name":"Pugzy/PGM","private":false,"owner":{"login":"Pugzy","id":8608892,"node_id":"MDQ6VXNlcjg2MDg4OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/8608892?v=4","gravatar_id":"","url":"https://api.github.com/users/Pugzy","html_url":"https://github.com/Pugzy","followers_url":"https://api.github.com/users/Pugzy/followers","following_url":"https://api.github.com/users/Pugzy/following{/other_user}","gists_url":"https://api.github.com/users/Pugzy/gists{/gist_id}","starred_url":"https://api.github.com/users/Pugzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pugzy/subscriptions","organizations_url":"https://api.github.com/users/Pugzy/orgs","repos_url":"https://api.github.com/users/Pugzy/repos","events_url":"https://api.github.com/users/Pugzy/events{/privacy}","received_events_url":"https://api.github.com/users/Pugzy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Pugzy/PGM","description":"The original PvP Game Manager for Minecraft","fork":true,"url":"https://api.github.com/repos/Pugzy/PGM","forks_url":"https://api.github.com/repos/Pugzy/PGM/forks","keys_url":"https://api.github.com/repos/Pugzy/PGM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pugzy/PGM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pugzy/PGM/teams","hooks_url":"https://api.github.com/repos/Pugzy/PGM/hooks","issue_events_url":"https://api.github.com/repos/Pugzy/PGM/issues/events{/number}","events_url":"https://api.github.com/repos/Pugzy/PGM/events","assignees_url":"https://api.github.com/repos/Pugzy/PGM/assignees{/user}","branches_url":"https://api.github.com/repos/Pugzy/PGM/branches{/branch}","tags_url":"https://api.github.com/repos/Pugzy/PGM/tags","blobs_url":"https://api.github.com/repos/Pugzy/PGM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pugzy/PGM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pugzy/PGM/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pugzy/PGM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pugzy/PGM/statuses/{sha}","languages_url":"https://api.github.com/repos/Pugzy/PGM/languages","stargazers_url":"https://api.github.com/repos/Pugzy/PGM/stargazers","contributors_url":"https://api.github.com/repos/Pugzy/PGM/contributors","subscribers_url":"https://api.github.com/repos/Pugzy/PGM/subscribers","subscription_url":"https://api.github.com/repos/Pugzy/PGM/subscription","commits_url":"https://api.github.com/repos/Pugzy/PGM/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pugzy/PGM/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pugzy/PGM/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pugzy/PGM/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pugzy/PGM/contents/{+path}","compare_url":"https://api.github.com/repos/Pugzy/PGM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pugzy/PGM/merges","archive_url":"https://api.github.com/repos/Pugzy/PGM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pugzy/PGM/downloads","issues_url":"https://api.github.com/repos/Pugzy/PGM/issues{/number}","pulls_url":"https://api.github.com/repos/Pugzy/PGM/pulls{/number}","milestones_url":"https://api.github.com/repos/Pugzy/PGM/milestones{/number}","notifications_url":"https://api.github.com/repos/Pugzy/PGM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pugzy/PGM/labels{/name}","releases_url":"https://api.github.com/repos/Pugzy/PGM/releases{/id}","deployments_url":"https://api.github.com/repos/Pugzy/PGM/deployments","created_at":"2019-11-17T21:26:49Z","updated_at":"2020-01-02T21:59:20Z","pushed_at":"2020-01-04T21:50:59Z","git_url":"git://github.com/Pugzy/PGM.git","ssh_url":"git@github.com:Pugzy/PGM.git","clone_url":"https://github.com/Pugzy/PGM.git","svn_url":"https://github.com/Pugzy/PGM","homepage":null,"size":9262,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Electroid:master","ref":"master","sha":"1a604f129d510489aa9ec0a398a31b3c787c139d","user":{"login":"Electroid","id":3238291,"node_id":"MDQ6VXNlcjMyMzgyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3238291?v=4","gravatar_id":"","url":"https://api.github.com/users/Electroid","html_url":"https://github.com/Electroid","followers_url":"https://api.github.com/users/Electroid/followers","following_url":"https://api.github.com/users/Electroid/following{/other_user}","gists_url":"https://api.github.com/users/Electroid/gists{/gist_id}","starred_url":"https://api.github.com/users/Electroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Electroid/subscriptions","organizations_url":"https://api.github.com/users/Electroid/orgs","repos_url":"https://api.github.com/users/Electroid/repos","events_url":"https://api.github.com/users/Electroid/events{/privacy}","received_events_url":"https://api.github.com/users/Electroid/received_events","type":"User","site_admin":false},"repo":{"id":217587403,"node_id":"MDEwOlJlcG9zaXRvcnkyMTc1ODc0MDM=","name":"PGM","full_name":"Electroid/PGM","private":false,"owner":{"login":"Electroid","id":3238291,"node_id":"MDQ6VXNlcjMyMzgyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3238291?v=4","gravatar_id":"","url":"https://api.github.com/users/Electroid","html_url":"https://github.com/Electroid","followers_url":"https://api.github.com/users/Electroid/followers","following_url":"https://api.github.com/users/Electroid/following{/other_user}","gists_url":"https://api.github.com/users/Electroid/gists{/gist_id}","starred_url":"https://api.github.com/users/Electroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Electroid/subscriptions","organizations_url":"https://api.github.com/users/Electroid/orgs","repos_url":"https://api.github.com/users/Electroid/repos","events_url":"https://api.github.com/users/Electroid/events{/privacy}","received_events_url":"https://api.github.com/users/Electroid/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Electroid/PGM","description":"The original PvP Game Manager for Minecraft","fork":false,"url":"https://api.github.com/repos/Electroid/PGM","forks_url":"https://api.github.com/repos/Electroid/PGM/forks","keys_url":"https://api.github.com/repos/Electroid/PGM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Electroid/PGM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Electroid/PGM/teams","hooks_url":"https://api.github.com/repos/Electroid/PGM/hooks","issue_events_url":"https://api.github.com/repos/Electroid/PGM/issues/events{/number}","events_url":"https://api.github.com/repos/Electroid/PGM/events","assignees_url":"https://api.github.com/repos/Electroid/PGM/assignees{/user}","branches_url":"https://api.github.com/repos/Electroid/PGM/branches{/branch}","tags_url":"https://api.github.com/repos/Electroid/PGM/tags","blobs_url":"https://api.github.com/repos/Electroid/PGM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Electroid/PGM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Electroid/PGM/git/refs{/sha}","trees_url":"https://api.github.com/repos/Electroid/PGM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Electroid/PGM/statuses/{sha}","languages_url":"https://api.github.com/repos/Electroid/PGM/languages","stargazers_url":"https://api.github.com/repos/Electroid/PGM/stargazers","contributors_url":"https://api.github.com/repos/Electroid/PGM/contributors","subscribers_url":"https://api.github.com/repos/Electroid/PGM/subscribers","subscription_url":"https://api.github.com/repos/Electroid/PGM/subscription","commits_url":"https://api.github.com/repos/Electroid/PGM/commits{/sha}","git_commits_url":"https://api.github.com/repos/Electroid/PGM/git/commits{/sha}","comments_url":"https://api.github.com/repos/Electroid/PGM/comments{/number}","issue_comment_url":"https://api.github.com/repos/Electroid/PGM/issues/comments{/number}","contents_url":"https://api.github.com/repos/Electroid/PGM/contents/{+path}","compare_url":"https://api.github.com/repos/Electroid/PGM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Electroid/PGM/merges","archive_url":"https://api.github.com/repos/Electroid/PGM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Electroid/PGM/downloads","issues_url":"https://api.github.com/repos/Electroid/PGM/issues{/number}","pulls_url":"https://api.github.com/repos/Electroid/PGM/pulls{/number}","milestones_url":"https://api.github.com/repos/Electroid/PGM/milestones{/number}","notifications_url":"https://api.github.com/repos/Electroid/PGM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Electroid/PGM/labels{/name}","releases_url":"https://api.github.com/repos/Electroid/PGM/releases{/id}","deployments_url":"https://api.github.com/repos/Electroid/PGM/deployments","created_at":"2019-10-25T17:53:40Z","updated_at":"2020-01-04T22:07:54Z","pushed_at":"2020-01-04T22:16:11Z","git_url":"git://github.com/Electroid/PGM.git","ssh_url":"git@github.com:Electroid/PGM.git","clone_url":"https://github.com/Electroid/PGM.git","svn_url":"https://github.com/Electroid/PGM","homepage":"https://oc.tc","size":9268,"stargazers_count":36,"watchers_count":36,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":53,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":19,"open_issues":53,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/180"},"html":{"href":"https://github.com/Electroid/PGM/pull/180"},"issue":{"href":"https://api.github.com/repos/Electroid/PGM/issues/180"},"comments":{"href":"https://api.github.com/repos/Electroid/PGM/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Electroid/PGM/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/Electroid/PGM/statuses/a3db0124601ee75285f5ea55966065745a14d844"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Electroid"}}