{"action":"created","comment":{"url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/comments/225645665","pull_request_review_id":165289906,"id":225645665,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTY0NTY2NQ==","diff_hunk":"@@ -33,1336 +33,1179 @@\n import com.sk89q.worldguard.LocalPlayer;\r\n import com.sk89q.worldguard.domains.DefaultDomain;\r\n import com.sk89q.worldguard.protection.ApplicableRegionSet;\r\n-import com.sk89q.worldguard.protection.databases.ProtectionDatabaseException;\r\n import com.sk89q.worldguard.protection.managers.RegionManager;\r\n+import com.sk89q.worldguard.protection.managers.storage.StorageException;\r\n import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;\r\n import com.sk89q.worldguard.protection.regions.ProtectedRegion;\r\n import com.sk89q.worldguard.protection.regions.ProtectedRegion.CircularInheritanceException;\r\n \r\n-public class PlotControl {\r\n-\r\n-\tprivate PlotManager mgr;\r\n \r\n-\tpublic PlotControl(PlotManager manager) {\r\n-\t\tthis.mgr = manager;\r\n+public class PlotControl {\r\n+    \r\n+    private PlotManager mgr;\r\n+    \r\n+    public PlotControl(PlotManager manager) {\r\n+\tthis.mgr = manager;\r\n+    }\r\n+    \r\n+    public PlotManager getPlotManager() {\r\n+\treturn this.mgr;\r\n+    }\r\n+    \r\n+    public int getRegionCountOfPlayer(World world, String playerName) {\r\n+\t// get WorldGuard's region manager\r\n+\tRegionManager regionManager = this.mgr.getPlotWorld(world.getName()).getRegionManager();\r\n+\t\r\n+\t// get online player\r\n+\tPlayer p = Bukkit.getPlayerExact(playerName);\r\n+\tif (p != null) {\r\n+\t    // when player is online, use WorldGuard's method of counting regions\r\n+\t    return regionManager.getRegionCountOfPlayer(this.mgr.getWorldGuard().wrapPlayer(p));\r\n \t}\r\n \t\r\n-\tpublic PlotManager getPlotManager() {\r\n-\t\treturn mgr;\r\n+\t// player is offline\r\n+\t\r\n+\t// get all regions\r\n+\tCollection<ProtectedRegion> regions = regionManager.getRegions().values();\r\n+\tif (regions == null || regions.isEmpty()) {\r\n+\t    return 0;\r\n \t}\r\n \t\r\n-\tpublic int getRegionCountOfPlayer(World world, String playerName) {\r\n-\t\t// get WorldGuard's region manager\r\n-\t\tRegionManager regionManager = mgr.getPlotWorld(world.getName()).getRegionManager();\r\n-\t\t\r\n-\t\t// get online player\r\n-\t\tPlayer p = Bukkit.getPlayerExact(playerName);\r\n-\t\tif(p != null) {\r\n-\t\t\t// when player is online, use WorldGuard's method of counting regions\r\n-\t\t\treturn regionManager.getRegionCountOfPlayer(mgr.getWorldGuard().wrapPlayer(p)); \r\n-\t\t}\r\n-\t\t\r\n-\t\t// player is offline\r\n-\t\t\r\n-\t\t// get all regions\r\n-\t\tCollection<ProtectedRegion> regions = regionManager.getRegions().values();\r\n-\t\tif(regions == null || regions.isEmpty()) {\r\n-\t\t\treturn 0;\r\n-\t\t}\r\n-\t\t\r\n-\t\t// count owned regions\r\n-\t\tint count = 0;\r\n-\t\tfor (ProtectedRegion region : regions) {\r\n-\t\t\tif(region.isOwner(playerName.toLowerCase())) {\r\n-\t\t\t\tcount++;\r\n-\t\t\t}\r\n+\t// count owned regions\r\n+\tint count = 0;\r\n+\tfor (ProtectedRegion region : regions) {\r\n+\t    if (region.isOwner(playerName.toLowerCase())) {\r\n+\t\tcount++;\r\n+\t    }\r\n+\t}\r\n+\treturn count;\r\n+    }\r\n+    \r\n+    private static final HashSet<Byte> invisibleBlocks = new HashSet<Byte>();\r\n+    \r\n+    @SuppressWarnings(\"deprecation\")\r\n+    public static HashSet<Byte> getInvisibleBlocks() {\r\n+\tif (invisibleBlocks.isEmpty()) {\r\n+\t    invisibleBlocks.add((byte) Material.AIR.getId());\r\n+\t    invisibleBlocks.add((byte) Material.WATER.getId());\r\n+\t    invisibleBlocks.add((byte) Material.STATIONARY_WATER.getId());\r\n+\t    invisibleBlocks.add((byte) Material.LAVA.getId());\r\n+\t    invisibleBlocks.add((byte) Material.STATIONARY_LAVA.getId());\r\n+\t    invisibleBlocks.add((byte) Material.SNOW.getId());\r\n+\t    invisibleBlocks.add((byte) Material.LONG_GRASS.getId());\r\n+\t}\r\n+\treturn invisibleBlocks;\r\n+    }\r\n+    \r\n+    @SuppressWarnings(\"deprecation\")\r","path":"src/main/java/com/mtihc/regionselfservice/v2/plots/PlotControl.java","position":101,"original_position":101,"commit_id":"8eb46d99cd9a6944f8ad6d19d7e6ff269813623a","original_commit_id":"8eb46d99cd9a6944f8ad6d19d7e6ff269813623a","user":{"login":"Mtihc","id":1358808,"node_id":"MDQ6VXNlcjEzNTg4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1358808?v=4","gravatar_id":"","url":"https://api.github.com/users/Mtihc","html_url":"https://github.com/Mtihc","followers_url":"https://api.github.com/users/Mtihc/followers","following_url":"https://api.github.com/users/Mtihc/following{/other_user}","gists_url":"https://api.github.com/users/Mtihc/gists{/gist_id}","starred_url":"https://api.github.com/users/Mtihc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mtihc/subscriptions","organizations_url":"https://api.github.com/users/Mtihc/orgs","repos_url":"https://api.github.com/users/Mtihc/repos","events_url":"https://api.github.com/users/Mtihc/events{/privacy}","received_events_url":"https://api.github.com/users/Mtihc/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n```\r\nI would suggest not to suppress \"deprecation\" warnings. I would either try to use not-deprecated code, or just keep letting it warn us.","created_at":"2018-10-16T17:54:23Z","updated_at":"2018-10-16T17:54:54Z","html_url":"https://github.com/Mtihc/RegionSelfService/pull/3#discussion_r225645665","pull_request_url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/comments/225645665"},"html":{"href":"https://github.com/Mtihc/RegionSelfService/pull/3#discussion_r225645665"},"pull_request":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3","id":12599190,"node_id":"MDExOlB1bGxSZXF1ZXN0MTI1OTkxOTA=","html_url":"https://github.com/Mtihc/RegionSelfService/pull/3","diff_url":"https://github.com/Mtihc/RegionSelfService/pull/3.diff","patch_url":"https://github.com/Mtihc/RegionSelfService/pull/3.patch","issue_url":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/3","number":3,"state":"open","locked":false,"title":"Use file.separator to express difference in FS.","user":{"login":"lifehome","id":1886237,"node_id":"MDQ6VXNlcjE4ODYyMzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1886237?v=4","gravatar_id":"","url":"https://api.github.com/users/lifehome","html_url":"https://github.com/lifehome","followers_url":"https://api.github.com/users/lifehome/followers","following_url":"https://api.github.com/users/lifehome/following{/other_user}","gists_url":"https://api.github.com/users/lifehome/gists{/gist_id}","starred_url":"https://api.github.com/users/lifehome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifehome/subscriptions","organizations_url":"https://api.github.com/users/lifehome/orgs","repos_url":"https://api.github.com/users/lifehome/repos","events_url":"https://api.github.com/users/lifehome/events{/privacy}","received_events_url":"https://api.github.com/users/lifehome/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-02-17T04:30:43Z","updated_at":"2018-10-16T17:54:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0aac48ab5ad4fcf82ec87e2e665980ae73cce54a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/3/comments","statuses_url":"https://api.github.com/repos/Mtihc/RegionSelfService/statuses/8eb46d99cd9a6944f8ad6d19d7e6ff269813623a","head":{"label":"lifehome:master","ref":"master","sha":"8eb46d99cd9a6944f8ad6d19d7e6ff269813623a","user":{"login":"lifehome","id":1886237,"node_id":"MDQ6VXNlcjE4ODYyMzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1886237?v=4","gravatar_id":"","url":"https://api.github.com/users/lifehome","html_url":"https://github.com/lifehome","followers_url":"https://api.github.com/users/lifehome/followers","following_url":"https://api.github.com/users/lifehome/following{/other_user}","gists_url":"https://api.github.com/users/lifehome/gists{/gist_id}","starred_url":"https://api.github.com/users/lifehome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifehome/subscriptions","organizations_url":"https://api.github.com/users/lifehome/orgs","repos_url":"https://api.github.com/users/lifehome/repos","events_url":"https://api.github.com/users/lifehome/events{/privacy}","received_events_url":"https://api.github.com/users/lifehome/received_events","type":"User","site_admin":false},"repo":{"id":16900900,"node_id":"MDEwOlJlcG9zaXRvcnkxNjkwMDkwMA==","name":"RegionSelfService","full_name":"lifehome/RegionSelfService","private":false,"owner":{"login":"lifehome","id":1886237,"node_id":"MDQ6VXNlcjE4ODYyMzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1886237?v=4","gravatar_id":"","url":"https://api.github.com/users/lifehome","html_url":"https://github.com/lifehome","followers_url":"https://api.github.com/users/lifehome/followers","following_url":"https://api.github.com/users/lifehome/following{/other_user}","gists_url":"https://api.github.com/users/lifehome/gists{/gist_id}","starred_url":"https://api.github.com/users/lifehome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifehome/subscriptions","organizations_url":"https://api.github.com/users/lifehome/orgs","repos_url":"https://api.github.com/users/lifehome/repos","events_url":"https://api.github.com/users/lifehome/events{/privacy}","received_events_url":"https://api.github.com/users/lifehome/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lifehome/RegionSelfService","description":"Plugin for Minecraft, using the WorldGuard plugin. Create/sell/rent regions with payment.","fork":true,"url":"https://api.github.com/repos/lifehome/RegionSelfService","forks_url":"https://api.github.com/repos/lifehome/RegionSelfService/forks","keys_url":"https://api.github.com/repos/lifehome/RegionSelfService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lifehome/RegionSelfService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lifehome/RegionSelfService/teams","hooks_url":"https://api.github.com/repos/lifehome/RegionSelfService/hooks","issue_events_url":"https://api.github.com/repos/lifehome/RegionSelfService/issues/events{/number}","events_url":"https://api.github.com/repos/lifehome/RegionSelfService/events","assignees_url":"https://api.github.com/repos/lifehome/RegionSelfService/assignees{/user}","branches_url":"https://api.github.com/repos/lifehome/RegionSelfService/branches{/branch}","tags_url":"https://api.github.com/repos/lifehome/RegionSelfService/tags","blobs_url":"https://api.github.com/repos/lifehome/RegionSelfService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lifehome/RegionSelfService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lifehome/RegionSelfService/git/refs{/sha}","trees_url":"https://api.github.com/repos/lifehome/RegionSelfService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lifehome/RegionSelfService/statuses/{sha}","languages_url":"https://api.github.com/repos/lifehome/RegionSelfService/languages","stargazers_url":"https://api.github.com/repos/lifehome/RegionSelfService/stargazers","contributors_url":"https://api.github.com/repos/lifehome/RegionSelfService/contributors","subscribers_url":"https://api.github.com/repos/lifehome/RegionSelfService/subscribers","subscription_url":"https://api.github.com/repos/lifehome/RegionSelfService/subscription","commits_url":"https://api.github.com/repos/lifehome/RegionSelfService/commits{/sha}","git_commits_url":"https://api.github.com/repos/lifehome/RegionSelfService/git/commits{/sha}","comments_url":"https://api.github.com/repos/lifehome/RegionSelfService/comments{/number}","issue_comment_url":"https://api.github.com/repos/lifehome/RegionSelfService/issues/comments{/number}","contents_url":"https://api.github.com/repos/lifehome/RegionSelfService/contents/{+path}","compare_url":"https://api.github.com/repos/lifehome/RegionSelfService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lifehome/RegionSelfService/merges","archive_url":"https://api.github.com/repos/lifehome/RegionSelfService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lifehome/RegionSelfService/downloads","issues_url":"https://api.github.com/repos/lifehome/RegionSelfService/issues{/number}","pulls_url":"https://api.github.com/repos/lifehome/RegionSelfService/pulls{/number}","milestones_url":"https://api.github.com/repos/lifehome/RegionSelfService/milestones{/number}","notifications_url":"https://api.github.com/repos/lifehome/RegionSelfService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lifehome/RegionSelfService/labels{/name}","releases_url":"https://api.github.com/repos/lifehome/RegionSelfService/releases{/id}","deployments_url":"https://api.github.com/repos/lifehome/RegionSelfService/deployments","created_at":"2014-02-17T03:33:24Z","updated_at":"2015-02-01T01:46:29Z","pushed_at":"2015-10-03T17:20:09Z","git_url":"git://github.com/lifehome/RegionSelfService.git","ssh_url":"git@github.com:lifehome/RegionSelfService.git","clone_url":"https://github.com/lifehome/RegionSelfService.git","svn_url":"https://github.com/lifehome/RegionSelfService","homepage":"http://dev.bukkit.org/server-mods/regionselfservice","size":674,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Mtihc:master","ref":"master","sha":"b37ce65df278016032e097615f47c066106fc6b3","user":{"login":"Mtihc","id":1358808,"node_id":"MDQ6VXNlcjEzNTg4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1358808?v=4","gravatar_id":"","url":"https://api.github.com/users/Mtihc","html_url":"https://github.com/Mtihc","followers_url":"https://api.github.com/users/Mtihc/followers","following_url":"https://api.github.com/users/Mtihc/following{/other_user}","gists_url":"https://api.github.com/users/Mtihc/gists{/gist_id}","starred_url":"https://api.github.com/users/Mtihc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mtihc/subscriptions","organizations_url":"https://api.github.com/users/Mtihc/orgs","repos_url":"https://api.github.com/users/Mtihc/repos","events_url":"https://api.github.com/users/Mtihc/events{/privacy}","received_events_url":"https://api.github.com/users/Mtihc/received_events","type":"User","site_admin":false},"repo":{"id":3831985,"node_id":"MDEwOlJlcG9zaXRvcnkzODMxOTg1","name":"RegionSelfService","full_name":"Mtihc/RegionSelfService","private":false,"owner":{"login":"Mtihc","id":1358808,"node_id":"MDQ6VXNlcjEzNTg4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1358808?v=4","gravatar_id":"","url":"https://api.github.com/users/Mtihc","html_url":"https://github.com/Mtihc","followers_url":"https://api.github.com/users/Mtihc/followers","following_url":"https://api.github.com/users/Mtihc/following{/other_user}","gists_url":"https://api.github.com/users/Mtihc/gists{/gist_id}","starred_url":"https://api.github.com/users/Mtihc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mtihc/subscriptions","organizations_url":"https://api.github.com/users/Mtihc/orgs","repos_url":"https://api.github.com/users/Mtihc/repos","events_url":"https://api.github.com/users/Mtihc/events{/privacy}","received_events_url":"https://api.github.com/users/Mtihc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Mtihc/RegionSelfService","description":"Plugin for Minecraft, using the WorldGuard plugin. Create/sell/rent regions with payment.","fork":false,"url":"https://api.github.com/repos/Mtihc/RegionSelfService","forks_url":"https://api.github.com/repos/Mtihc/RegionSelfService/forks","keys_url":"https://api.github.com/repos/Mtihc/RegionSelfService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mtihc/RegionSelfService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mtihc/RegionSelfService/teams","hooks_url":"https://api.github.com/repos/Mtihc/RegionSelfService/hooks","issue_events_url":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/events{/number}","events_url":"https://api.github.com/repos/Mtihc/RegionSelfService/events","assignees_url":"https://api.github.com/repos/Mtihc/RegionSelfService/assignees{/user}","branches_url":"https://api.github.com/repos/Mtihc/RegionSelfService/branches{/branch}","tags_url":"https://api.github.com/repos/Mtihc/RegionSelfService/tags","blobs_url":"https://api.github.com/repos/Mtihc/RegionSelfService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mtihc/RegionSelfService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mtihc/RegionSelfService/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mtihc/RegionSelfService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mtihc/RegionSelfService/statuses/{sha}","languages_url":"https://api.github.com/repos/Mtihc/RegionSelfService/languages","stargazers_url":"https://api.github.com/repos/Mtihc/RegionSelfService/stargazers","contributors_url":"https://api.github.com/repos/Mtihc/RegionSelfService/contributors","subscribers_url":"https://api.github.com/repos/Mtihc/RegionSelfService/subscribers","subscription_url":"https://api.github.com/repos/Mtihc/RegionSelfService/subscription","commits_url":"https://api.github.com/repos/Mtihc/RegionSelfService/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mtihc/RegionSelfService/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mtihc/RegionSelfService/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mtihc/RegionSelfService/contents/{+path}","compare_url":"https://api.github.com/repos/Mtihc/RegionSelfService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mtihc/RegionSelfService/merges","archive_url":"https://api.github.com/repos/Mtihc/RegionSelfService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mtihc/RegionSelfService/downloads","issues_url":"https://api.github.com/repos/Mtihc/RegionSelfService/issues{/number}","pulls_url":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls{/number}","milestones_url":"https://api.github.com/repos/Mtihc/RegionSelfService/milestones{/number}","notifications_url":"https://api.github.com/repos/Mtihc/RegionSelfService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mtihc/RegionSelfService/labels{/name}","releases_url":"https://api.github.com/repos/Mtihc/RegionSelfService/releases{/id}","deployments_url":"https://api.github.com/repos/Mtihc/RegionSelfService/deployments","created_at":"2012-03-26T11:18:43Z","updated_at":"2013-11-25T14:44:14Z","pushed_at":"2015-10-03T15:09:07Z","git_url":"git://github.com/Mtihc/RegionSelfService.git","ssh_url":"git@github.com:Mtihc/RegionSelfService.git","clone_url":"https://github.com/Mtihc/RegionSelfService.git","svn_url":"https://github.com/Mtihc/RegionSelfService","homepage":"http://dev.bukkit.org/server-mods/regionselfservice","size":549,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":5,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3"},"html":{"href":"https://github.com/Mtihc/RegionSelfService/pull/3"},"issue":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/3"},"comments":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Mtihc/RegionSelfService/statuses/8eb46d99cd9a6944f8ad6d19d7e6ff269813623a"}},"author_association":"NONE"}}
{"actor":{"display_login":"Mtihc"}}