{"action":"opened","number":314,"pull_request":{"url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314","id":54029989,"html_url":"https://github.com/ImagicalCorp/ImagicalMine/pull/314","diff_url":"https://github.com/ImagicalCorp/ImagicalMine/pull/314.diff","patch_url":"https://github.com/ImagicalCorp/ImagicalMine/pull/314.patch","issue_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/314","number":314,"state":"open","locked":false,"title":"Update Player.php","user":{"login":"PocketServers","id":16107357,"avatar_url":"https://avatars.githubusercontent.com/u/16107357?v=3","gravatar_id":"","url":"https://api.github.com/users/PocketServers","html_url":"https://github.com/PocketServers","followers_url":"https://api.github.com/users/PocketServers/followers","following_url":"https://api.github.com/users/PocketServers/following{/other_user}","gists_url":"https://api.github.com/users/PocketServers/gists{/gist_id}","starred_url":"https://api.github.com/users/PocketServers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PocketServers/subscriptions","organizations_url":"https://api.github.com/users/PocketServers/orgs","repos_url":"https://api.github.com/users/PocketServers/repos","events_url":"https://api.github.com/users/PocketServers/events{/privacy}","received_events_url":"https://api.github.com/users/PocketServers/received_events","type":"User","site_admin":false},"body":"new foo core items and you can eat them\r\n\r\n\t\t}\r\n\t\t$items = [ // TODO: move this to item classes\r\nItem::APPLE => 4,Item::MUSHROOM_STEW => 10,Item::RABBIT_STEW => 6 Item::BEETROOT_SOUP => 5,Item::BREAD => 5,Item::RAW_PORKCHOP => 2,Item::COOKED_PORKCHOP => 8,Item::RAW_BEEF => 3,Item::STEAK => 8,Item::COOKED_CHICKEN => 6,Item::RAW_CHICKEN => 2,Item::MELON_SLICE => 2,Item::GOLDEN_APPLE => 4,Item::PUMPKIN_PIE => 8,\r\n\t\t\t\tItem::CARROT => 3,Item::GOLDEN_CARROT => 6,Item::POTATO => 1,Item::BAKED_POTATO => 5,Item::COOKIE => 2,Item::COOKED_FISH => [0 => 5,1 => 6],Item::RAW_FISH => [0 => 2,1 => 2,2 => 1,3 => 1]];\r\n\t\t$slot = $this->inventory->getItemInHand();\r\n\t\tif(isset($items[$slot->getId()])){\r\n\t\t\tif($this->getFood() < 20 and isset($items[$slot->getId()])){\r\n\t\t\t\t$this->server->getPluginManager()->callEvent($ev = new PlayerItemConsumeEvent($this, $slot));\r\n\t\t\t\tif($ev->isCancelled()){\r\n\t\t\t\t\t$this->inventory->sendContents($this);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$pk = new EntityEventPacket();\r\n\t\t\t\t$pk->eid = $this->getId();\r\n\t\t\t\t$pk->event = EntityEventPacket::USE_ITEM;\r\n\t\t\t\t$this->dataPacket($pk);\r\n\t\t\t\tServer::broadcastPacket($this->getViewers(), $pk);\r\n\t\t\t\t$amount = $items[$slot->getId()];\r\n\t\t\t\tif(is_array($amount)){\r\n\t\t\t\t\t$amount = isset($amount[$slot->getDamage()])?$amount[$slot->getDamage()]:0;\r\n\t\t\t\t}\r\n\t\t\t\t$this->setFood($this->getFood() + $amount);\r\n\t\t\t\t--$slot->count;\r\n\t\t\t\t$this->inventory->setItemInHand($slot);\r\n\t\t\t\tif($slot->getId() === Item::MUSHROOM_STEW or $slot->getId() === Item::BEETROOT_SOUP){\r\n\t\t\t\t\t$this->inventory->addItem(Item::get(Item::BOWL, 0, 1));\r\n\t\t\t\t}\r\n\t\t\t\telseif($slot->getId() === Item::RAW_FISH and $slot->getDamage() === 3){ // Pufferfish\r\n\t\t\t\t\t$this->addEffect(Effect::getEffect(Effect::HUNGER)->setAmplifier(2)->setDuration(15 * 20));\r\n\t\t\t\t\t// $this->addEffect(Effect::getEffect(Effect::NAUSEA)->setAmplifier(1)->setDuration(15 * 20));\r\n\t\t\t\t\t$this->addEffect(Effect::getEffect(Effect::POISON)->setAmplifier(3)->setDuration(60 * 20));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}","created_at":"2015-12-17T20:51:38Z","updated_at":"2015-12-17T20:51:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314/commits","review_comments_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314/comments","review_comment_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/314/comments","statuses_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/statuses/0e86a45c70e471367a1b6e21ce0c27358191b0d7","head":{"label":"PocketServers:patch-3","ref":"patch-3","sha":"0e86a45c70e471367a1b6e21ce0c27358191b0d7","user":{"login":"PocketServers","id":16107357,"avatar_url":"https://avatars.githubusercontent.com/u/16107357?v=3","gravatar_id":"","url":"https://api.github.com/users/PocketServers","html_url":"https://github.com/PocketServers","followers_url":"https://api.github.com/users/PocketServers/followers","following_url":"https://api.github.com/users/PocketServers/following{/other_user}","gists_url":"https://api.github.com/users/PocketServers/gists{/gist_id}","starred_url":"https://api.github.com/users/PocketServers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PocketServers/subscriptions","organizations_url":"https://api.github.com/users/PocketServers/orgs","repos_url":"https://api.github.com/users/PocketServers/repos","events_url":"https://api.github.com/users/PocketServers/events{/privacy}","received_events_url":"https://api.github.com/users/PocketServers/received_events","type":"User","site_admin":false},"repo":{"id":47839139,"name":"ImagicalMine","full_name":"PocketServers/ImagicalMine","owner":{"login":"PocketServers","id":16107357,"avatar_url":"https://avatars.githubusercontent.com/u/16107357?v=3","gravatar_id":"","url":"https://api.github.com/users/PocketServers","html_url":"https://github.com/PocketServers","followers_url":"https://api.github.com/users/PocketServers/followers","following_url":"https://api.github.com/users/PocketServers/following{/other_user}","gists_url":"https://api.github.com/users/PocketServers/gists{/gist_id}","starred_url":"https://api.github.com/users/PocketServers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PocketServers/subscriptions","organizations_url":"https://api.github.com/users/PocketServers/orgs","repos_url":"https://api.github.com/users/PocketServers/repos","events_url":"https://api.github.com/users/PocketServers/events{/privacy}","received_events_url":"https://api.github.com/users/PocketServers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PocketServers/ImagicalMine","description":"The revamped version of PocketMine, completely unofficial by the Imagical Corporation team.","fork":true,"url":"https://api.github.com/repos/PocketServers/ImagicalMine","forks_url":"https://api.github.com/repos/PocketServers/ImagicalMine/forks","keys_url":"https://api.github.com/repos/PocketServers/ImagicalMine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PocketServers/ImagicalMine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PocketServers/ImagicalMine/teams","hooks_url":"https://api.github.com/repos/PocketServers/ImagicalMine/hooks","issue_events_url":"https://api.github.com/repos/PocketServers/ImagicalMine/issues/events{/number}","events_url":"https://api.github.com/repos/PocketServers/ImagicalMine/events","assignees_url":"https://api.github.com/repos/PocketServers/ImagicalMine/assignees{/user}","branches_url":"https://api.github.com/repos/PocketServers/ImagicalMine/branches{/branch}","tags_url":"https://api.github.com/repos/PocketServers/ImagicalMine/tags","blobs_url":"https://api.github.com/repos/PocketServers/ImagicalMine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PocketServers/ImagicalMine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PocketServers/ImagicalMine/git/refs{/sha}","trees_url":"https://api.github.com/repos/PocketServers/ImagicalMine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PocketServers/ImagicalMine/statuses/{sha}","languages_url":"https://api.github.com/repos/PocketServers/ImagicalMine/languages","stargazers_url":"https://api.github.com/repos/PocketServers/ImagicalMine/stargazers","contributors_url":"https://api.github.com/repos/PocketServers/ImagicalMine/contributors","subscribers_url":"https://api.github.com/repos/PocketServers/ImagicalMine/subscribers","subscription_url":"https://api.github.com/repos/PocketServers/ImagicalMine/subscription","commits_url":"https://api.github.com/repos/PocketServers/ImagicalMine/commits{/sha}","git_commits_url":"https://api.github.com/repos/PocketServers/ImagicalMine/git/commits{/sha}","comments_url":"https://api.github.com/repos/PocketServers/ImagicalMine/comments{/number}","issue_comment_url":"https://api.github.com/repos/PocketServers/ImagicalMine/issues/comments{/number}","contents_url":"https://api.github.com/repos/PocketServers/ImagicalMine/contents/{+path}","compare_url":"https://api.github.com/repos/PocketServers/ImagicalMine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PocketServers/ImagicalMine/merges","archive_url":"https://api.github.com/repos/PocketServers/ImagicalMine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PocketServers/ImagicalMine/downloads","issues_url":"https://api.github.com/repos/PocketServers/ImagicalMine/issues{/number}","pulls_url":"https://api.github.com/repos/PocketServers/ImagicalMine/pulls{/number}","milestones_url":"https://api.github.com/repos/PocketServers/ImagicalMine/milestones{/number}","notifications_url":"https://api.github.com/repos/PocketServers/ImagicalMine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PocketServers/ImagicalMine/labels{/name}","releases_url":"https://api.github.com/repos/PocketServers/ImagicalMine/releases{/id}","created_at":"2015-12-11T16:56:09Z","updated_at":"2015-12-11T16:56:12Z","pushed_at":"2015-12-17T20:51:30Z","git_url":"git://github.com/PocketServers/ImagicalMine.git","ssh_url":"git@github.com:PocketServers/ImagicalMine.git","clone_url":"https://github.com/PocketServers/ImagicalMine.git","svn_url":"https://github.com/PocketServers/ImagicalMine","homepage":"http://imagicalcorp.ml","size":13745,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ImagicalCorp:master","ref":"master","sha":"5ea6954aac950d7e056a690d333c20329b479d03","user":{"login":"ImagicalCorp","id":15314206,"avatar_url":"https://avatars.githubusercontent.com/u/15314206?v=3","gravatar_id":"","url":"https://api.github.com/users/ImagicalCorp","html_url":"https://github.com/ImagicalCorp","followers_url":"https://api.github.com/users/ImagicalCorp/followers","following_url":"https://api.github.com/users/ImagicalCorp/following{/other_user}","gists_url":"https://api.github.com/users/ImagicalCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ImagicalCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ImagicalCorp/subscriptions","organizations_url":"https://api.github.com/users/ImagicalCorp/orgs","repos_url":"https://api.github.com/users/ImagicalCorp/repos","events_url":"https://api.github.com/users/ImagicalCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ImagicalCorp/received_events","type":"Organization","site_admin":false},"repo":{"id":46078564,"name":"ImagicalMine","full_name":"ImagicalCorp/ImagicalMine","owner":{"login":"ImagicalCorp","id":15314206,"avatar_url":"https://avatars.githubusercontent.com/u/15314206?v=3","gravatar_id":"","url":"https://api.github.com/users/ImagicalCorp","html_url":"https://github.com/ImagicalCorp","followers_url":"https://api.github.com/users/ImagicalCorp/followers","following_url":"https://api.github.com/users/ImagicalCorp/following{/other_user}","gists_url":"https://api.github.com/users/ImagicalCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ImagicalCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ImagicalCorp/subscriptions","organizations_url":"https://api.github.com/users/ImagicalCorp/orgs","repos_url":"https://api.github.com/users/ImagicalCorp/repos","events_url":"https://api.github.com/users/ImagicalCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ImagicalCorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ImagicalCorp/ImagicalMine","description":"The revamped version of PocketMine, completely unofficial by the Imagical Corporation team.","fork":false,"url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine","forks_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/forks","keys_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/teams","hooks_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/hooks","issue_events_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/events{/number}","events_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/events","assignees_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/assignees{/user}","branches_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/branches{/branch}","tags_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/tags","blobs_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/git/refs{/sha}","trees_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/statuses/{sha}","languages_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/languages","stargazers_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/stargazers","contributors_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/contributors","subscribers_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/subscribers","subscription_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/subscription","commits_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/commits{/sha}","git_commits_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/git/commits{/sha}","comments_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/comments{/number}","issue_comment_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/comments{/number}","contents_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/contents/{+path}","compare_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/merges","archive_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/downloads","issues_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues{/number}","pulls_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls{/number}","milestones_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/milestones{/number}","notifications_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/labels{/name}","releases_url":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/releases{/id}","created_at":"2015-11-12T20:22:00Z","updated_at":"2015-12-16T21:26:52Z","pushed_at":"2015-12-17T20:11:03Z","git_url":"git://github.com/ImagicalCorp/ImagicalMine.git","ssh_url":"git@github.com:ImagicalCorp/ImagicalMine.git","clone_url":"https://github.com/ImagicalCorp/ImagicalMine.git","svn_url":"https://github.com/ImagicalCorp/ImagicalMine","homepage":"http://jenkins.imagicalcorp.ml:8080/job/ImagicalMine","size":13943,"stargazers_count":95,"watchers_count":95,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":57,"mirror_url":null,"open_issues_count":23,"forks":57,"open_issues":23,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314"},"html":{"href":"https://github.com/ImagicalCorp/ImagicalMine/pull/314"},"issue":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/314"},"comments":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/ImagicalCorp/ImagicalMine/statuses/0e86a45c70e471367a1b6e21ce0c27358191b0d7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}