diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index f7782c19f..3d0ae8141 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1680,6 +1680,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade $pk = new StartGamePacket(); $pk->seed = -1; + $pk->dimension = 0; $pk->x = $this->x; $pk->y = $this->y; $pk->z = $this->z; @@ -1783,7 +1784,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade $this->setNameTag($this->username); $this->iusername = strtolower($this->username); - if(count($this->server->getOnlinePlayers()) > $this->server->getMaxPlayers() and $this->kick("disconnectionScreen.serverFull", false)){ + if(count($this->server->getOnlinePlayers()) >= $this->server->getMaxPlayers() and $this->kick("disconnectionScreen.serverFull", false)){ break; } diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php index db3cac450..e788421c6 100644 --- a/src/pocketmine/inventory/PlayerInventory.php +++ b/src/pocketmine/inventory/PlayerInventory.php @@ -383,10 +383,17 @@ class PlayerInventory extends BaseInventory{ } $pk = new ContainerSetContentPacket(); - $pk; $pk->slots = []; - for($i = 0; $i < $this->getSize(); ++$i){ //Do not send armor by error here - $pk->slots[$i] = $this->getItem($i); + $holder = $this->getHolder(); + if($holder instanceof Player and $holder->isCreative()){ + //TODO: Remove this workaround because of broken client + foreach(Item::getCreativeItems() as $i => $item){ + $pk->slots[$i] = Item::getCreativeItem($i); + } + }else{ + for($i = 0; $i < $this->getSize(); ++$i){ //Do not send armor by error here + $pk->slots[$i] = $this->getItem($i); + } } foreach($target as $player){ @@ -416,7 +423,6 @@ class PlayerInventory extends BaseInventory{ } $pk = new ContainerSetSlotPacket(); - $pk; $pk->slot = $index; $pk->item = clone $this->getItem($index); diff --git a/src/pocketmine/scheduler/SendUsageTask.php b/src/pocketmine/scheduler/SendUsageTask.php index c9d488c67..179340e38 100644 --- a/src/pocketmine/scheduler/SendUsageTask.php +++ b/src/pocketmine/scheduler/SendUsageTask.php @@ -26,6 +26,7 @@ use pocketmine\Server; use pocketmine\utils\Utils; use pocketmine\utils\UUID; use pocketmine\utils\VersionString; +use pocketmine\utils\UUID; class SendUsageTask extends AsyncTask{ @@ -40,9 +41,9 @@ class SendUsageTask extends AsyncTask{ $endpoint = "http://" . $server->getProperty("anonymous-statistics.host", "stats.pocketmine.net") . "/"; $data = []; - $data["uniqueServerId"] = $server->getServerUniqueId(); - $data["uniqueMachineId"] = Utils::getMachineUniqueId(); - $data["uniqueRequestId"] = UUID::fromData($server->getServerUniqueId(), microtime(true)); + $data["uniqueServerId"] = $server->getServerUniqueId()->toString(); + $data["uniqueMachineId"] = Utils::getMachineUniqueId()->toString(); + $data["uniqueRequestId"] = UUID::fromData($server->getServerUniqueId(), microtime(true))->toString(); switch($type){ case self::TYPE_OPEN: diff --git a/src/pocketmine/tile/EnchantTable.php b/src/pocketmine/tile/EnchantTable.php index c906edf2e..0ddc33df9 100644 --- a/src/pocketmine/tile/EnchantTable.php +++ b/src/pocketmine/tile/EnchantTable.php @@ -29,7 +29,7 @@ class EnchantTable extends Spawnable implements Nameable{ public function getName(){ - return isset($this->namedtag->CustomName) ? $this->namedtag->CustomName->getValue() : "Chest"; + return isset($this->namedtag->CustomName) ? $this->namedtag->CustomName->getValue() : "Enchanting Table"; } public function hasName(){ diff --git a/src/pocketmine/tile/Furnace.php b/src/pocketmine/tile/Furnace.php index 9deaee8b2..f972597e9 100644 --- a/src/pocketmine/tile/Furnace.php +++ b/src/pocketmine/tile/Furnace.php @@ -71,7 +71,7 @@ class Furnace extends Tile implements InventoryHolder, Container, Nameable{ } public function getName(){ - return isset($this->namedtag->CustomName) ? $this->namedtag->CustomName->getValue() : "Chest"; + return isset($this->namedtag->CustomName) ? $this->namedtag->CustomName->getValue() : "Furnace"; } public function hasName(){