{"action":"created","issue":{"url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/175","labels_url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/175/comments","events_url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/175/events","html_url":"https://github.com/benbaptist/minecraft-wrapper/issues/175","id":66651697,"number":175,"title":"protection plugin","user":{"login":"Cougar","id":60040,"avatar_url":"https://avatars.githubusercontent.com/u/60040?v=3","gravatar_id":"","url":"https://api.github.com/users/Cougar","html_url":"https://github.com/Cougar","followers_url":"https://api.github.com/users/Cougar/followers","following_url":"https://api.github.com/users/Cougar/following{/other_user}","gists_url":"https://api.github.com/users/Cougar/gists{/gist_id}","starred_url":"https://api.github.com/users/Cougar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cougar/subscriptions","organizations_url":"https://api.github.com/users/Cougar/orgs","repos_url":"https://api.github.com/users/Cougar/repos","events_url":"https://api.github.com/users/Cougar/events{/privacy}","received_events_url":"https://api.github.com/users/Cougar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-06T16:51:58Z","updated_at":"2015-04-06T18:59:20Z","closed_at":null,"body":"I'm developing plugin to manage world protection for spawns and warps. This could  also be used for players (and teams) to give them protected areas for building.\r\n\r\nIt basically works but due no block visibility in proxy, it needs different workarounds and not all things can be done. For example I can get area information when clicking area (with stick for example) but I can't make area visible like Bukkit plugins can do.\r\n\r\nOne thing I'm stuck a little bit is the performance of the code. I haven't found any good library for fast coordinate lookup. Just having array of (x1, z1, x2, z2) duples and doing linear lookup doesn't scale well. Especially if every \"dig\", \"place\" and \"interact\" events needs to be processed. Every new protected area adds search time. I already have some ideas how to optimize it but I'm sure that this kind of problems are solved before.\r\n\r\nDoes anyone know any good python library for such lookups?"},"comment":{"url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/comments/90198287","html_url":"https://github.com/benbaptist/minecraft-wrapper/issues/175#issuecomment-90198287","issue_url":"https://api.github.com/repos/benbaptist/minecraft-wrapper/issues/175","id":90198287,"user":{"login":"suresttexas00","id":10001762,"avatar_url":"https://avatars.githubusercontent.com/u/10001762?v=3","gravatar_id":"","url":"https://api.github.com/users/suresttexas00","html_url":"https://github.com/suresttexas00","followers_url":"https://api.github.com/users/suresttexas00/followers","following_url":"https://api.github.com/users/suresttexas00/following{/other_user}","gists_url":"https://api.github.com/users/suresttexas00/gists{/gist_id}","starred_url":"https://api.github.com/users/suresttexas00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suresttexas00/subscriptions","organizations_url":"https://api.github.com/users/suresttexas00/orgs","repos_url":"https://api.github.com/users/suresttexas00/repos","events_url":"https://api.github.com/users/suresttexas00/events{/privacy}","received_events_url":"https://api.github.com/users/suresttexas00/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T18:59:20Z","updated_at":"2015-04-06T18:59:20Z","body":"Good idea about sending bedrock... OK.. YES!  update #172 fixed it! :D ... and the Z coord is also working!  Here is a before and after record from two regions, one made before the patch and one after...\r\n\r\n\"Benrish4th\": {\"flgs\": {\"breakprot\": true, \"placeprot\": true}, \"dim\": 0, \"placeplayers\": {}, \"breakplayers\": {}, \"protected\": true, \"banplayers\": {}, \"accessplayers\": {}, \"pos2\": [-5480, 250, 67092008], \"ownerUuid\": \"07ea7265-3b2e-41c3-bda8-8af83cf32949\", \"pos1\": [-5634, 1, 67091813]},\r\n\r\n \"james\": {\"flgs\": {\"breakprot\": true, \"placeprot\": true}, \"dim\": 0, \"banplayers\": {}, \"placeplayers\": {\"4f953255-6775-4dc6-a612-fb4230588eff\": \"SurestTexas00\"}, \"breakplayers\": {\"4f953255-6775-4dc6-a612-fb4230588eff\": \"SurestTexas00\"}, \"protected\": true, \"accessplayers\": {\"4f953255-6775-4dc6-a612-fb4230588eff\": \"SurestTexas00\"}, \"pos2\": [1000055, 200, -9999895], \"ownerUuid\": \"4f953255-6775-4dc6-a612-fb4230588eff\", \"pos1\": [1000045, 20, -9999906]}\r\n"}}