diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index fa898a47c..4526caa37 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -749,7 +749,7 @@ class Server{ $name = strtolower($name); $delta = PHP_INT_MAX; foreach($this->getOnlinePlayers() as $player){ - if(stripos($player->getName(), $name) !== false){ + if(stripos($player->getName(), $name) === 0){ $curDelta = strlen($player->getName()) - strlen($name); if($curDelta < $delta){ $found = $player; @@ -1814,7 +1814,7 @@ class Server{ if(($data = json_decode($reply)) !== false and isset($data->crashId)){ $reportId = $data->crashId; $reportUrl = $data->crashUrl; - $this->logger->emergency("The crash dump has ben automatically submitted to the Crash Archive. You can view it on $reportUrl or use the ID #$reportId."); + $this->logger->emergency("The crash dump has been automatically submitted to the Crash Archive. You can view it on $reportUrl or use the ID #$reportId."); } } diff --git a/start.sh b/start.sh index 6a0c7b43e..9af5a3b97 100755 --- a/start.sh +++ b/start.sh @@ -24,7 +24,7 @@ done if [ "$PHP_BINARY" == "" ]; then if [ -f ./bin/php5/bin/php ]; then PHP_BINARY="./bin/php5/bin/php" - elif [ type php 2>/dev/null ]; then + elif type php > /dev/null 2>&1 ; then PHP_BINARY=$(type -p php) else echo "Couldn't find a working PHP binary, please use the installer." @@ -57,4 +57,4 @@ done if [ ${LOOPS} -gt 1 ]; then echo "Restarted $LOOPS times" -fi \ No newline at end of file +fi