diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index 2b2ea22c..52f63225 100755 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -511,7 +511,7 @@ class BlockAPI{ if(($player->gamemode & 0x01) === 0x00){ --$item->count; if($item->count <= 0){ - $player->setSlot($player->slot, BlockAPI::getItem(AIR, 0, 0), true); + $player->setSlot($player->slot, BlockAPI::getItem(AIR, 0, 0), false); } } diff --git a/src/Player.php b/src/Player.php index 9e14c5f6..aa6b17f1 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1747,7 +1747,7 @@ class Player{ }elseif($s->getID() !== AIR and $slot->getID() !== AIR and ($slot->getID() !== $s->getID() or $slot->getMetadata() !== $s->getMetadata()) and ($sl = $this->hasItem($s->getID())) !== false){ $item = $this->armor[$i]; $this->armor[$i] = $this->getSlot($sl); - $this->setSlot($sl, $item, true); + $this->setSlot($sl, $item, false); }else{ $packet->slots[$i] = 255; } diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 05183557..9ced5b39 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -350,7 +350,7 @@ class PocketMinecraftServer{ $hnid = $this->handCnt++; $this->handlers[$hnid] = $callable; $this->query("INSERT INTO handlers (ID, name, priority) VALUES (" . $hnid . ", '" . str_replace("'", "\\'", $event) . "', " . $priority . ");"); - console("[INTERNAL] New handler " . (is_array($callable) ? get_class($callable[0]) . "::" . $callable[1] : $callable) . " to special event " . $event . " (ID " . $hnid . ")", true, true, 3); + //console("[INTERNAL] New handler " . (is_array($callable) ? get_class($callable[0]) . "::" . $callable[1] : $callable) . " to special event " . $event . " (ID " . $hnid . ")", true, true, 3); return $hnid; } @@ -596,7 +596,7 @@ class PocketMinecraftServer{ $this->preparedSQL->updateAction->bindValue(":time", $time, SQLITE3_FLOAT); $this->preparedSQL->updateAction->bindValue(":id", $cid, SQLITE3_INTEGER); $this->preparedSQL->updateAction->execute(); - if(!@is_callable($this->schedule[$cid][0])){ + if(!isset($this->schedule[$cid]) || !isset($this->schedule[$cid][0]) || !@is_callable($this->schedule[$cid][0])){ $return = false; }else{ ++$actionCount; diff --git a/start.cmd b/start.cmd index 3bc40264..d0585867 100644 --- a/start.cmd +++ b/start.cmd @@ -13,5 +13,4 @@ if exist bin\php\php.exe ( ) else ( php -d enable_dl=On PocketMine-MP.php %* ) -) - +) \ No newline at end of file