From d12ce8fd6cbe2c5ae5acb687c1943334fba91166 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 19 Feb 2014 02:23:45 +0100 Subject: [PATCH] small fixes --- src/Player.php | 2 +- src/PocketMinecraftServer.php | 3 ++- src/build/compile.sh | 2 +- src/functions.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Player.php b/src/Player.php index e1f4a8e2c..40ede5726 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1658,7 +1658,7 @@ class Player{ $this->entity->updateMetadata(); } - if($this->blocked === true or ($this->entity->position instanceof Vector3 and $blockVector->distance($this->entity->position) > 10)){ + if($this->blocked === true or ($this->entity instanceof Entity and $blockVector->distance($this->entity) > 10)){ }elseif($this->getSlot($this->slot)->getID() !== $packet->item or ($this->getSlot($this->slot)->isTool() === false and $this->getSlot($this->slot)->getMetadata() !== $packet->meta)){ $this->sendInventorySlot($this->slot); diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 6a907678e..3c6b29a28 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -21,7 +21,7 @@ class PocketMinecraftServer{ public $tCnt; - public $serverID, $interface, $database, $version, $invisible, $tickMeasure, $preparedSQL, $spawn, $seed, $stop, $gamemode, $difficulty, $name, $maxClients, $clients, $eidCnt, $custom, $description, $motd, $port, $saveEnabled; + public $serverID, $interface, $database, $version, $invisible, $tickMeasure, $preparedSQL, $spawn, $whitelist, $seed, $stop, $gamemode, $difficulty, $name, $maxClients, $clients, $eidCnt, $custom, $description, $motd, $port, $saveEnabled; private $serverip, $evCnt, $handCnt, $events, $eventsID, $handlers, $serverType, $lastTick, $doTick, $ticks, $memoryStats, $schedule, $asyncThread, $async = array(), $asyncID = 0; /** @@ -58,6 +58,7 @@ class PocketMinecraftServer{ $this->clients = array(); $this->spawn = false; $this->saveEnabled = true; + $this->whitelist = false; $this->tickMeasure = array_fill(0, 40, 0); $this->setType("normal"); $this->interface = new MinecraftInterface("255.255.255.255", $this->port, $this->serverip); diff --git a/src/build/compile.sh b/src/build/compile.sh index baeda7204..08ab28930 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -126,7 +126,7 @@ elif [ "$1" == "crosscompile" ]; then exit 1 fi elif [ -z "$CFLAGS" ]; then - if [ `getconf LONG_BIT` = "64" ]; then + if [ `getconf LONG_BIT` == "64" ]; then echo "[INFO] Compiling for current machine using 64-bit" CFLAGS="-m64 $CFLAGS" OPENSSL_TARGET="linux-x86_64" diff --git a/src/functions.php b/src/functions.php index 75ed19015..1784f992e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -140,7 +140,7 @@ function arguments ( $args ){ $args = array(); } array_shift( $args ); - $args = implode( $args, ' ' ); + $args = implode(' ', $args); preg_match_all('/ (--[\w\-]+ (?:[= ] [^-\s]+ )? ) | (-\w+) | (\w+) /x', $args, $match ); $args = array_shift( $match );