From 2231395d333fb70dbb6f69b13108580ac3e42984 Mon Sep 17 00:00:00 2001 From: jasonwynn10 Date: Mon, 16 Aug 2021 23:44:34 -0400 Subject: [PATCH] Smallest optimization ever --- src/MyPlot/MyPlot.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/MyPlot/MyPlot.php b/src/MyPlot/MyPlot.php index d1b34309..6a1cbc38 100644 --- a/src/MyPlot/MyPlot.php +++ b/src/MyPlot/MyPlot.php @@ -279,11 +279,7 @@ public function getPlotByPosition(Position $position) : ?Plot { return $plot; $posSW = $posS->getSide(Vector3::SIDE_WEST, $plotLevel->roadWidth + 1); - $plot = $this->getPlotFast($posSW->x, $posSW->z, $plotLevel); - if($plot instanceof Plot) - return $plot; - - return null; // this is the road and there are no plots here + return $this->getPlotFast($posSW->x, $posSW->z, $plotLevel); } private function getPlotFast(float $x, float $z, PlotLevelSettings $plotLevel) : ?Plot {