{"action":"created","comment":{"url":"https://api.github.com/repos/tastybento/bskyblock/pulls/comments/166125763","pull_request_review_id":94158339,"id":166125763,"diff_hunk":"@@ -29,101 +29,148 @@\n  *\n  */\n public class Flags {\n-    private static BSkyBlock p;\n-    \n+    public static Flag ANVIL;","path":"src/main/java/us/tastybento/bskyblock/lists/Flags.java","position":null,"original_position":6,"commit_id":"812594783e6fd001d5035c93c1ba905bc97066ce","original_commit_id":"c64840985871689dc1ff5cfb7c8d1c3225a37984","user":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"body":"Let me think about this. I'll propose something.","created_at":"2018-02-05T22:00:11Z","updated_at":"2018-02-05T22:00:12Z","html_url":"https://github.com/tastybento/bskyblock/pull/138#discussion_r166125763","pull_request_url":"https://api.github.com/repos/tastybento/bskyblock/pulls/138","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/comments/166125763"},"html":{"href":"https://github.com/tastybento/bskyblock/pull/138#discussion_r166125763"},"pull_request":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/138"}},"in_reply_to_id":165828698},"pull_request":{"url":"https://api.github.com/repos/tastybento/bskyblock/pulls/138","id":165616986,"html_url":"https://github.com/tastybento/bskyblock/pull/138","diff_url":"https://github.com/tastybento/bskyblock/pull/138.diff","patch_url":"https://github.com/tastybento/bskyblock/pull/138.patch","issue_url":"https://api.github.com/repos/tastybento/bskyblock/issues/138","number":138,"state":"open","locked":false,"title":"Ranks","user":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"body":"This adds ranks to island members. Have a look at TestBSkyBlock.java for examples and test.\r\nEssentially, ranks are an integer. Some ranks are hardcoded because they are essential to the game:\r\n\r\nOwner = 1000\r\nMember = 700\r\nVisitor = 0\r\nBanned = -1\r\n\r\nIn the config.yml, admins can define custom ranks. I added one \"Coop\" as an example. The actual name of the rank is defined in the locale and the ranks are referenced by the locale reference, e.g., \"ranks.owner\". The hardcoded ones have constants defined in RanksManager.java.\r\n\r\nEach island holds a list of members and their associated rank. As the owner is a special case, I kept a field for him. In theory, islands could have more than one owner, but for now, I kept it all as a single owner. All the methods for adding members, making and owner, or banning someone use the set ranks. There are general methods for setting or getting a player's rank.\r\n\r\nThere is a RanksManager. The main job of this is to load ranks, give rank values and provide a sorted list of ranks. This last one can be used for the promote/demote command.\r\n\r\nFor protection, Islands now have a hashmap of flags and their associated bypass rank value. If a player has a rank greater or equal to the rank value then they bypass the flag. It is therefore quite simple to check if a player has permission to bypass the flag or not and there is an isAllowed() method to do that. There is currently no global setting of flags for an island. If a query is made and the flag is not set, it defaults to Member rank being required.\r\n\r\nThere's obviously more to do, but I think this is a good place to pause and review.","created_at":"2018-01-29T05:04:58Z","updated_at":"2018-02-05T22:00:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5ac393dafa577cbec214c6b6d98328f3ea21468","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/tastybento/bskyblock/pulls/138/commits","review_comments_url":"https://api.github.com/repos/tastybento/bskyblock/pulls/138/comments","review_comment_url":"https://api.github.com/repos/tastybento/bskyblock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tastybento/bskyblock/issues/138/comments","statuses_url":"https://api.github.com/repos/tastybento/bskyblock/statuses/812594783e6fd001d5035c93c1ba905bc97066ce","head":{"label":"tastybento:ranks","ref":"ranks","sha":"812594783e6fd001d5035c93c1ba905bc97066ce","user":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"repo":{"id":91916253,"name":"bskyblock","full_name":"tastybento/bskyblock","owner":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tastybento/bskyblock","description":"The next generation of askyblock!","fork":false,"url":"https://api.github.com/repos/tastybento/bskyblock","forks_url":"https://api.github.com/repos/tastybento/bskyblock/forks","keys_url":"https://api.github.com/repos/tastybento/bskyblock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tastybento/bskyblock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tastybento/bskyblock/teams","hooks_url":"https://api.github.com/repos/tastybento/bskyblock/hooks","issue_events_url":"https://api.github.com/repos/tastybento/bskyblock/issues/events{/number}","events_url":"https://api.github.com/repos/tastybento/bskyblock/events","assignees_url":"https://api.github.com/repos/tastybento/bskyblock/assignees{/user}","branches_url":"https://api.github.com/repos/tastybento/bskyblock/branches{/branch}","tags_url":"https://api.github.com/repos/tastybento/bskyblock/tags","blobs_url":"https://api.github.com/repos/tastybento/bskyblock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tastybento/bskyblock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tastybento/bskyblock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tastybento/bskyblock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tastybento/bskyblock/statuses/{sha}","languages_url":"https://api.github.com/repos/tastybento/bskyblock/languages","stargazers_url":"https://api.github.com/repos/tastybento/bskyblock/stargazers","contributors_url":"https://api.github.com/repos/tastybento/bskyblock/contributors","subscribers_url":"https://api.github.com/repos/tastybento/bskyblock/subscribers","subscription_url":"https://api.github.com/repos/tastybento/bskyblock/subscription","commits_url":"https://api.github.com/repos/tastybento/bskyblock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tastybento/bskyblock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tastybento/bskyblock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tastybento/bskyblock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tastybento/bskyblock/contents/{+path}","compare_url":"https://api.github.com/repos/tastybento/bskyblock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tastybento/bskyblock/merges","archive_url":"https://api.github.com/repos/tastybento/bskyblock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tastybento/bskyblock/downloads","issues_url":"https://api.github.com/repos/tastybento/bskyblock/issues{/number}","pulls_url":"https://api.github.com/repos/tastybento/bskyblock/pulls{/number}","milestones_url":"https://api.github.com/repos/tastybento/bskyblock/milestones{/number}","notifications_url":"https://api.github.com/repos/tastybento/bskyblock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tastybento/bskyblock/labels{/name}","releases_url":"https://api.github.com/repos/tastybento/bskyblock/releases{/id}","deployments_url":"https://api.github.com/repos/tastybento/bskyblock/deployments","created_at":"2017-05-20T21:05:15Z","updated_at":"2018-02-03T11:15:44Z","pushed_at":"2018-02-05T19:35:56Z","git_url":"git://github.com/tastybento/bskyblock.git","ssh_url":"git@github.com:tastybento/bskyblock.git","clone_url":"https://github.com/tastybento/bskyblock.git","svn_url":"https://github.com/tastybento/bskyblock","homepage":null,"size":42136,"stargazers_count":22,"watchers_count":22,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":70,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":8,"open_issues":70,"watchers":22,"default_branch":"master"}},"base":{"label":"tastybento:develop","ref":"develop","sha":"1d5b0ab8dd703916412010923e7c74b84897a8df","user":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"repo":{"id":91916253,"name":"bskyblock","full_name":"tastybento/bskyblock","owner":{"login":"tastybento","id":4407265,"avatar_url":"https://avatars2.githubusercontent.com/u/4407265?v=4","gravatar_id":"","url":"https://api.github.com/users/tastybento","html_url":"https://github.com/tastybento","followers_url":"https://api.github.com/users/tastybento/followers","following_url":"https://api.github.com/users/tastybento/following{/other_user}","gists_url":"https://api.github.com/users/tastybento/gists{/gist_id}","starred_url":"https://api.github.com/users/tastybento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tastybento/subscriptions","organizations_url":"https://api.github.com/users/tastybento/orgs","repos_url":"https://api.github.com/users/tastybento/repos","events_url":"https://api.github.com/users/tastybento/events{/privacy}","received_events_url":"https://api.github.com/users/tastybento/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tastybento/bskyblock","description":"The next generation of askyblock!","fork":false,"url":"https://api.github.com/repos/tastybento/bskyblock","forks_url":"https://api.github.com/repos/tastybento/bskyblock/forks","keys_url":"https://api.github.com/repos/tastybento/bskyblock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tastybento/bskyblock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tastybento/bskyblock/teams","hooks_url":"https://api.github.com/repos/tastybento/bskyblock/hooks","issue_events_url":"https://api.github.com/repos/tastybento/bskyblock/issues/events{/number}","events_url":"https://api.github.com/repos/tastybento/bskyblock/events","assignees_url":"https://api.github.com/repos/tastybento/bskyblock/assignees{/user}","branches_url":"https://api.github.com/repos/tastybento/bskyblock/branches{/branch}","tags_url":"https://api.github.com/repos/tastybento/bskyblock/tags","blobs_url":"https://api.github.com/repos/tastybento/bskyblock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tastybento/bskyblock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tastybento/bskyblock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tastybento/bskyblock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tastybento/bskyblock/statuses/{sha}","languages_url":"https://api.github.com/repos/tastybento/bskyblock/languages","stargazers_url":"https://api.github.com/repos/tastybento/bskyblock/stargazers","contributors_url":"https://api.github.com/repos/tastybento/bskyblock/contributors","subscribers_url":"https://api.github.com/repos/tastybento/bskyblock/subscribers","subscription_url":"https://api.github.com/repos/tastybento/bskyblock/subscription","commits_url":"https://api.github.com/repos/tastybento/bskyblock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tastybento/bskyblock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tastybento/bskyblock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tastybento/bskyblock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tastybento/bskyblock/contents/{+path}","compare_url":"https://api.github.com/repos/tastybento/bskyblock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tastybento/bskyblock/merges","archive_url":"https://api.github.com/repos/tastybento/bskyblock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tastybento/bskyblock/downloads","issues_url":"https://api.github.com/repos/tastybento/bskyblock/issues{/number}","pulls_url":"https://api.github.com/repos/tastybento/bskyblock/pulls{/number}","milestones_url":"https://api.github.com/repos/tastybento/bskyblock/milestones{/number}","notifications_url":"https://api.github.com/repos/tastybento/bskyblock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tastybento/bskyblock/labels{/name}","releases_url":"https://api.github.com/repos/tastybento/bskyblock/releases{/id}","deployments_url":"https://api.github.com/repos/tastybento/bskyblock/deployments","created_at":"2017-05-20T21:05:15Z","updated_at":"2018-02-03T11:15:44Z","pushed_at":"2018-02-05T19:35:56Z","git_url":"git://github.com/tastybento/bskyblock.git","ssh_url":"git@github.com:tastybento/bskyblock.git","clone_url":"https://github.com/tastybento/bskyblock.git","svn_url":"https://github.com/tastybento/bskyblock","homepage":null,"size":42136,"stargazers_count":22,"watchers_count":22,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":70,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":8,"open_issues":70,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/138"},"html":{"href":"https://github.com/tastybento/bskyblock/pull/138"},"issue":{"href":"https://api.github.com/repos/tastybento/bskyblock/issues/138"},"comments":{"href":"https://api.github.com/repos/tastybento/bskyblock/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tastybento/bskyblock/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/tastybento/bskyblock/statuses/812594783e6fd001d5035c93c1ba905bc97066ce"}},"author_association":"OWNER"}}
{"actor":{"display_login":"tastybento"}}