small fixes

This commit is contained in:
Shoghi Cervantes 2014-02-19 02:23:45 +01:00
parent dd177b689b
commit d12ce8fd6c
4 changed files with 5 additions and 4 deletions

View File

@ -1658,7 +1658,7 @@ class Player{
$this->entity->updateMetadata(); $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)){ }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); $this->sendInventorySlot($this->slot);

View File

@ -21,7 +21,7 @@
class PocketMinecraftServer{ class PocketMinecraftServer{
public $tCnt; 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; 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->clients = array();
$this->spawn = false; $this->spawn = false;
$this->saveEnabled = true; $this->saveEnabled = true;
$this->whitelist = false;
$this->tickMeasure = array_fill(0, 40, 0); $this->tickMeasure = array_fill(0, 40, 0);
$this->setType("normal"); $this->setType("normal");
$this->interface = new MinecraftInterface("255.255.255.255", $this->port, $this->serverip); $this->interface = new MinecraftInterface("255.255.255.255", $this->port, $this->serverip);

View File

@ -126,7 +126,7 @@ elif [ "$1" == "crosscompile" ]; then
exit 1 exit 1
fi fi
elif [ -z "$CFLAGS" ]; then 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" echo "[INFO] Compiling for current machine using 64-bit"
CFLAGS="-m64 $CFLAGS" CFLAGS="-m64 $CFLAGS"
OPENSSL_TARGET="linux-x86_64" OPENSSL_TARGET="linux-x86_64"

View File

@ -140,7 +140,7 @@ function arguments ( $args ){
$args = array(); $args = array();
} }
array_shift( $args ); array_shift( $args );
$args = implode( $args, ' ' ); $args = implode(' ', $args);
preg_match_all('/ (--[\w\-]+ (?:[= ] [^-\s]+ )? ) | (-\w+) | (\w+) /x', $args, $match ); preg_match_all('/ (--[\w\-]+ (?:[= ] [^-\s]+ )? ) | (-\w+) | (\w+) /x', $args, $match );
$args = array_shift( $match ); $args = array_shift( $match );