To be very honest, I have no idea what to do. Code: CRITICAL TypeError: "Argument 1 passed to minijaham\CE\Util\Facing::opposite() must be of the type int, null given, called in /plugins/CustomEnchants/src/minijaham/CE/EventListener.php on line 54" (EXCEPTION) in "plugins/CustomEnchants/src/minijaham/CE/Util/Facing" at line 73 21.12 23:47:32 [Server] CRITICAL #0 plugins/CustomEnchants/src/minijaham/CE/EventListener(54): minijaham\CE\Util\Facing::opposite(NULL ) 21.12 23:47:32 [Server] CRITICAL #1 src/pocketmine/plugin/MethodEventExecutor(42): minijaham\CE\EventListener->onDriller(object pocketmine\event\block\BlockBreakEvent) 21.12 23:47:32 [Server] CRITICAL #2 src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object minijaham\CE\EventListener, object pocketmine\event\block\BlockBreakEvent) Code: PHP: public function onBreak(BlockBreakEvent $event){ $player = $event->getPlayer(); if($player->getInventory()->getItemInHand()->getEnchantment(121)){ $breakFace = self::$lastBreakFace[$player->getName()]; for ($i = 0; $i <= 1; $i++) { $block = $event->getBlock()->getSide(Facing::opposite($breakFace), $i); // Line 54 $faceLeft = Facing::rotate($breakFace, Facing::axis($breakFace) !== Facing::AXIS_Y ? Facing::AXIS_Y : Facing::AXIS_X, true); $faceUp = Facing::rotate($breakFace, Facing::axis($breakFace) !== Facing::AXIS_Z ? Facing::AXIS_Z : Facing::AXIS_X, true); foreach ([ $block->getSide($faceLeft), //Center Left $block->getSide(Facing::opposite($faceLeft)), //Center Right $block->getSide($faceUp), //Center Top $block->getSide(Facing::opposite($faceUp)), //Center Bottom $block->getSide($faceUp)->getSide($faceLeft), //Top Left $block->getSide($faceUp)->getSide(Facing::opposite($faceLeft)), //Top Right $block->getSide(Facing::opposite($faceUp))->getSide($faceLeft), //Bottom Left $block->getSide(Facing::opposite($faceUp))->getSide(Facing::opposite($faceLeft)) //Bottom Right ] as $b) { $player->getLevel()->useBreakOn($b, $item, $player, true); } if (!$block->equals($event->getBlock())) { $player->getLevel()->useBreakOn($block, $item, $player, true); } } } } Class Facing PHP: class Facing{public const AXIS_Y = 0;public const AXIS_Z = 1;public const AXIS_X = 2;public const FLAG_AXIS_POSITIVE = 1;/* most significant 2 bits = axis, least significant bit = is positive direction */public const DOWN = self::AXIS_Y << 1;public const UP = (self::AXIS_Y << 1) | self::FLAG_AXIS_POSITIVE;public const NORTH = self::AXIS_Z << 1;public const SOUTH = (self::AXIS_Z << 1) | self::FLAG_AXIS_POSITIVE;public const WEST = self::AXIS_X << 1;public const EAST = (self::AXIS_X << 1) | self::FLAG_AXIS_POSITIVE;public const ALL = [self::DOWN,self::UP,self::NORTH,self::SOUTH,self::WEST,self::EAST];public const HORIZONTAL = [self::NORTH,self::SOUTH,self::WEST,self::EAST];private const CLOCKWISE = [self::AXIS_Y => [self::NORTH => self::EAST,self::EAST => self::SOUTH,self::SOUTH => self::WEST,self::WEST => self::NORTH],self::AXIS_Z => [self::UP => self::EAST,self::EAST => self::DOWN,self::DOWN => self::WEST,self::WEST => self::UP],self::AXIS_X => [self::UP => self::NORTH,self::NORTH => self::DOWN,self::DOWN => self::SOUTH,self::SOUTH => self::UP]];public static function axis(int $direction): int{return $direction >> 1; //shift off positive/negative bit}public static function isPositive(int $direction): bool{return ($direction & self::FLAG_AXIS_POSITIVE) === self::FLAG_AXIS_POSITIVE;}public static function opposite(int $direction): int // line 73{return $direction ^ self::FLAG_AXIS_POSITIVE;} Why is this returning null?