Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Commit

Permalink
Remove var_dumps 🤦
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenophilicy committed Jul 1, 2020
1 parent 0c50256 commit d1a76ff
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Xenophilicy/FoodEffects/FoodEffects.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,13 @@ public function onItemConsume(PlayerItemConsumeEvent $event){
$player = $event->getPlayer();
$item = $event->getItem();
$idFull = $item->getId().":".$item->getDamage();
var_dump(round($player->getFood()) < 20);
if(!(round($player->getFood()) < 20) && self::$settings["Require-Hunger"]) return;
foreach(self::$consumables as $key => $values){
$effects = $values["Effects"];
$name = isset($values["Name"]) ? $values["Name"] : false;
if($name && $item->getCustomName() !== $name) continue;
if($idFull !== (string)$key) continue;
if(!self::$settings["Affects-Hunger"]) $event->setCancelled();
var_dump($effects);
foreach($effects as $effValues){
$effectInstance = new EffectInstance(Effect::getEffect($effValues[0]));
$duration = $effValues[2] > 0 ? $effValues[2]*20 : 2147483647;
Expand Down

0 comments on commit d1a76ff

Please sign in to comment.