TrapActive)) $nbt->TrapActive = new StringTag("TrapActive", "true"); parent::__construct($chunk, $nbt); } /* Sets if the trap is active @param $trapActive bool */ public function setTrapActive(bool $trapActive) { if($trapActive) { $this->namedtag->TrapActive->setValue("true"); } else { $this->namedtag->TrapActive->setValue("false"); } return $this; } /* Check if the trap is active. @return bool */ public function isTrapActive() : bool { if($this->namedtag->TrapActive->getValue() == "false") { return false; } return true; } }