{"action":"created","comment":{"url":"https://api.github.com/repos/iTXTech/Genisys/pulls/comments/77511642","id":77511642,"diff_hunk":"@@ -27,9 +27,9 @@ public function initEntity(){\n \t}\n \n \tpublic function attack($damage, EntityDamageEvent $source){\n-\t\tparent::attack($damage, $source);\n-\n-\t\t$this->close();\n+\t\tif(parent::attack($damage, $source)){\n+\t\t\t$this->close();","path":"src/pocketmine/entity/Painting.php","position":8,"original_position":8,"commit_id":"edb6b399f5b0f3cb64a0db710dfa6a2b31ce9a04","original_commit_id":"edb6b399f5b0f3cb64a0db710dfa6a2b31ce9a04","user":{"login":"thebigsmileXD","id":8733998,"avatar_url":"https://avatars.githubusercontent.com/u/8733998?v=3","gravatar_id":"","url":"https://api.github.com/users/thebigsmileXD","html_url":"https://github.com/thebigsmileXD","followers_url":"https://api.github.com/users/thebigsmileXD/followers","following_url":"https://api.github.com/users/thebigsmileXD/following{/other_user}","gists_url":"https://api.github.com/users/thebigsmileXD/gists{/gist_id}","starred_url":"https://api.github.com/users/thebigsmileXD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thebigsmileXD/subscriptions","organizations_url":"https://api.github.com/users/thebigsmileXD/orgs","repos_url":"https://api.github.com/users/thebigsmileXD/repos","events_url":"https://api.github.com/users/thebigsmileXD/events{/privacy}","received_events_url":"https://api.github.com/users/thebigsmileXD/received_events","type":"User","site_admin":false},"body":"would not drop the item anymore","created_at":"2016-09-05T12:00:23Z","updated_at":"2016-09-05T12:00:23Z","html_url":"https://github.com/iTXTech/Genisys/pull/1866#discussion_r77511642","pull_request_url":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866","_links":{"self":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/comments/77511642"},"html":{"href":"https://github.com/iTXTech/Genisys/pull/1866#discussion_r77511642"},"pull_request":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866"}}},"pull_request":{"url":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866","id":83985094,"html_url":"https://github.com/iTXTech/Genisys/pull/1866","diff_url":"https://github.com/iTXTech/Genisys/pull/1866.diff","patch_url":"https://github.com/iTXTech/Genisys/pull/1866.patch","issue_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1866","number":1866,"state":"open","locked":false,"title":"Fixes #1857, closes #1859","user":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"body":"### Description\r\nFixes #1857. Replaces #1859.\r\n\r\n### Reason to modify\r\n<!-- \r\n- Think twice before modifying: is it the best way? will it break things? \r\n- Have you made sure that there is actually a problem before trying to fix it?\r\n- Explain the logic behind your changes - WHY and HOW what you have done works\r\n-->\r\nRefer to @dktapps's rejection comment on #1859.\r\n\r\n### Tests & Reviews\r\n<!-- Uncomment based on the situation -->\r\nI have **not** tested the code and it **most likely** works. Reason: I don't have any device installed with MCPE. I did not buy MCPE. I hereby declare that both statements above are true.\r\n\r\nMental simulation:\r\n1. Not-yet-called event is passed to `Painting::attack`\r\n2. Delegation to parent `Entity::attack` from `Painting::attack` (`Painting.php:30`)\r\n3. Event is called in `Entity::attack`. (`Entity.php:684`)\r\n4. Event is cancelled by plugins.\r\n5. Event is found to be cancelled by plugins, so `Entity::attack` returns false to `Painting::attack`. (`Entity.php:685`)\r\n6. Only if the delegation to parent returns true (event is not cancelled and no exceptions thrown), `Painting::close` is triggered (`Painting.php:31`). If delegation to parent returns false (event is cancelled), nothing happens on the Painting class.","created_at":"2016-09-05T10:58:04Z","updated_at":"2016-09-05T12:00:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44bd792feb8ed11279fd138b83bf85324e228e4c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866/commits","review_comments_url":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866/comments","review_comment_url":"https://api.github.com/repos/iTXTech/Genisys/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iTXTech/Genisys/issues/1866/comments","statuses_url":"https://api.github.com/repos/iTXTech/Genisys/statuses/edb6b399f5b0f3cb64a0db710dfa6a2b31ce9a04","head":{"label":"SOF3:patch-2","ref":"patch-2","sha":"edb6b399f5b0f3cb64a0db710dfa6a2b31ce9a04","user":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"repo":{"id":67347937,"name":"Genisys","full_name":"SOF3/Genisys","owner":{"login":"SOF3","id":19623715,"avatar_url":"https://avatars.githubusercontent.com/u/19623715?v=3","gravatar_id":"","url":"https://api.github.com/users/SOF3","html_url":"https://github.com/SOF3","followers_url":"https://api.github.com/users/SOF3/followers","following_url":"https://api.github.com/users/SOF3/following{/other_user}","gists_url":"https://api.github.com/users/SOF3/gists{/gist_id}","starred_url":"https://api.github.com/users/SOF3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SOF3/subscriptions","organizations_url":"https://api.github.com/users/SOF3/orgs","repos_url":"https://api.github.com/users/SOF3/repos","events_url":"https://api.github.com/users/SOF3/events{/privacy}","received_events_url":"https://api.github.com/users/SOF3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SOF3/Genisys","description":"Feature-rich server software for Minecraft: Pocket Edition based on PocketMine-MP","fork":true,"url":"https://api.github.com/repos/SOF3/Genisys","forks_url":"https://api.github.com/repos/SOF3/Genisys/forks","keys_url":"https://api.github.com/repos/SOF3/Genisys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SOF3/Genisys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SOF3/Genisys/teams","hooks_url":"https://api.github.com/repos/SOF3/Genisys/hooks","issue_events_url":"https://api.github.com/repos/SOF3/Genisys/issues/events{/number}","events_url":"https://api.github.com/repos/SOF3/Genisys/events","assignees_url":"https://api.github.com/repos/SOF3/Genisys/assignees{/user}","branches_url":"https://api.github.com/repos/SOF3/Genisys/branches{/branch}","tags_url":"https://api.github.com/repos/SOF3/Genisys/tags","blobs_url":"https://api.github.com/repos/SOF3/Genisys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SOF3/Genisys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SOF3/Genisys/git/refs{/sha}","trees_url":"https://api.github.com/repos/SOF3/Genisys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SOF3/Genisys/statuses/{sha}","languages_url":"https://api.github.com/repos/SOF3/Genisys/languages","stargazers_url":"https://api.github.com/repos/SOF3/Genisys/stargazers","contributors_url":"https://api.github.com/repos/SOF3/Genisys/contributors","subscribers_url":"https://api.github.com/repos/SOF3/Genisys/subscribers","subscription_url":"https://api.github.com/repos/SOF3/Genisys/subscription","commits_url":"https://api.github.com/repos/SOF3/Genisys/commits{/sha}","git_commits_url":"https://api.github.com/repos/SOF3/Genisys/git/commits{/sha}","comments_url":"https://api.github.com/repos/SOF3/Genisys/comments{/number}","issue_comment_url":"https://api.github.com/repos/SOF3/Genisys/issues/comments{/number}","contents_url":"https://api.github.com/repos/SOF3/Genisys/contents/{+path}","compare_url":"https://api.github.com/repos/SOF3/Genisys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SOF3/Genisys/merges","archive_url":"https://api.github.com/repos/SOF3/Genisys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SOF3/Genisys/downloads","issues_url":"https://api.github.com/repos/SOF3/Genisys/issues{/number}","pulls_url":"https://api.github.com/repos/SOF3/Genisys/pulls{/number}","milestones_url":"https://api.github.com/repos/SOF3/Genisys/milestones{/number}","notifications_url":"https://api.github.com/repos/SOF3/Genisys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SOF3/Genisys/labels{/name}","releases_url":"https://api.github.com/repos/SOF3/Genisys/releases{/id}","deployments_url":"https://api.github.com/repos/SOF3/Genisys/deployments","created_at":"2016-09-04T14:00:13Z","updated_at":"2016-09-04T14:00:16Z","pushed_at":"2016-09-05T10:49:16Z","git_url":"git://github.com/SOF3/Genisys.git","ssh_url":"git@github.com:SOF3/Genisys.git","clone_url":"https://github.com/SOF3/Genisys.git","svn_url":"https://github.com/SOF3/Genisys","homepage":"https://itxtech.org","size":4202,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"master"}},"base":{"label":"iTXTech:master","ref":"master","sha":"fc9778ef29f5d2325e186c1e632d6c5db95df39a","user":{"login":"iTXTech","id":15979485,"avatar_url":"https://avatars.githubusercontent.com/u/15979485?v=3","gravatar_id":"","url":"https://api.github.com/users/iTXTech","html_url":"https://github.com/iTXTech","followers_url":"https://api.github.com/users/iTXTech/followers","following_url":"https://api.github.com/users/iTXTech/following{/other_user}","gists_url":"https://api.github.com/users/iTXTech/gists{/gist_id}","starred_url":"https://api.github.com/users/iTXTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTXTech/subscriptions","organizations_url":"https://api.github.com/users/iTXTech/orgs","repos_url":"https://api.github.com/users/iTXTech/repos","events_url":"https://api.github.com/users/iTXTech/events{/privacy}","received_events_url":"https://api.github.com/users/iTXTech/received_events","type":"Organization","site_admin":false},"repo":{"id":48602252,"name":"Genisys","full_name":"iTXTech/Genisys","owner":{"login":"iTXTech","id":15979485,"avatar_url":"https://avatars.githubusercontent.com/u/15979485?v=3","gravatar_id":"","url":"https://api.github.com/users/iTXTech","html_url":"https://github.com/iTXTech","followers_url":"https://api.github.com/users/iTXTech/followers","following_url":"https://api.github.com/users/iTXTech/following{/other_user}","gists_url":"https://api.github.com/users/iTXTech/gists{/gist_id}","starred_url":"https://api.github.com/users/iTXTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTXTech/subscriptions","organizations_url":"https://api.github.com/users/iTXTech/orgs","repos_url":"https://api.github.com/users/iTXTech/repos","events_url":"https://api.github.com/users/iTXTech/events{/privacy}","received_events_url":"https://api.github.com/users/iTXTech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iTXTech/Genisys","description":"Feature-rich server software for Minecraft: Pocket Edition based on PocketMine-MP","fork":false,"url":"https://api.github.com/repos/iTXTech/Genisys","forks_url":"https://api.github.com/repos/iTXTech/Genisys/forks","keys_url":"https://api.github.com/repos/iTXTech/Genisys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iTXTech/Genisys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iTXTech/Genisys/teams","hooks_url":"https://api.github.com/repos/iTXTech/Genisys/hooks","issue_events_url":"https://api.github.com/repos/iTXTech/Genisys/issues/events{/number}","events_url":"https://api.github.com/repos/iTXTech/Genisys/events","assignees_url":"https://api.github.com/repos/iTXTech/Genisys/assignees{/user}","branches_url":"https://api.github.com/repos/iTXTech/Genisys/branches{/branch}","tags_url":"https://api.github.com/repos/iTXTech/Genisys/tags","blobs_url":"https://api.github.com/repos/iTXTech/Genisys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iTXTech/Genisys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iTXTech/Genisys/git/refs{/sha}","trees_url":"https://api.github.com/repos/iTXTech/Genisys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iTXTech/Genisys/statuses/{sha}","languages_url":"https://api.github.com/repos/iTXTech/Genisys/languages","stargazers_url":"https://api.github.com/repos/iTXTech/Genisys/stargazers","contributors_url":"https://api.github.com/repos/iTXTech/Genisys/contributors","subscribers_url":"https://api.github.com/repos/iTXTech/Genisys/subscribers","subscription_url":"https://api.github.com/repos/iTXTech/Genisys/subscription","commits_url":"https://api.github.com/repos/iTXTech/Genisys/commits{/sha}","git_commits_url":"https://api.github.com/repos/iTXTech/Genisys/git/commits{/sha}","comments_url":"https://api.github.com/repos/iTXTech/Genisys/comments{/number}","issue_comment_url":"https://api.github.com/repos/iTXTech/Genisys/issues/comments{/number}","contents_url":"https://api.github.com/repos/iTXTech/Genisys/contents/{+path}","compare_url":"https://api.github.com/repos/iTXTech/Genisys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iTXTech/Genisys/merges","archive_url":"https://api.github.com/repos/iTXTech/Genisys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iTXTech/Genisys/downloads","issues_url":"https://api.github.com/repos/iTXTech/Genisys/issues{/number}","pulls_url":"https://api.github.com/repos/iTXTech/Genisys/pulls{/number}","milestones_url":"https://api.github.com/repos/iTXTech/Genisys/milestones{/number}","notifications_url":"https://api.github.com/repos/iTXTech/Genisys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iTXTech/Genisys/labels{/name}","releases_url":"https://api.github.com/repos/iTXTech/Genisys/releases{/id}","deployments_url":"https://api.github.com/repos/iTXTech/Genisys/deployments","created_at":"2015-12-26T06:54:28Z","updated_at":"2016-09-04T18:25:20Z","pushed_at":"2016-09-05T11:59:31Z","git_url":"git://github.com/iTXTech/Genisys.git","ssh_url":"git@github.com:iTXTech/Genisys.git","clone_url":"https://github.com/iTXTech/Genisys.git","svn_url":"https://github.com/iTXTech/Genisys","homepage":"https://itxtech.org","size":7158,"stargazers_count":312,"watchers_count":312,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":258,"mirror_url":null,"open_issues_count":39,"forks":258,"open_issues":39,"watchers":312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866"},"html":{"href":"https://github.com/iTXTech/Genisys/pull/1866"},"issue":{"href":"https://api.github.com/repos/iTXTech/Genisys/issues/1866"},"comments":{"href":"https://api.github.com/repos/iTXTech/Genisys/issues/1866/comments"},"review_comments":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866/comments"},"review_comment":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iTXTech/Genisys/pulls/1866/commits"},"statuses":{"href":"https://api.github.com/repos/iTXTech/Genisys/statuses/edb6b399f5b0f3cb64a0db710dfa6a2b31ce9a04"}}}}
{"actor":{"display_login":"thebigsmileXD"}}