diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 537f9ff479..ac9e10aad2 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -366,6 +366,9 @@ class Server{ return $this->getConfigString("server-ip", "0.0.0.0"); } + /** + * @return UUID + */ public function getServerUniqueId(){ return $this->serverID; } diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 1576bf9ffb..855fd8afef 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -293,7 +293,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ $this->setSkin($this->namedtag->Skin["Data"], $this->namedtag->Skin["Name"]); } - $this->uuid = UUID::fromData($this->getId(), $this->getSkinData(), $this->getNameTag()); + $this->uuid = UUID::fromData((string) $this->getId(), $this->getSkinData(), $this->getNameTag()); } if(isset($this->namedtag->Inventory) and $this->namedtag->Inventory instanceof ListTag){ diff --git a/src/pocketmine/inventory/CraftingManager.php b/src/pocketmine/inventory/CraftingManager.php index 99aba153cd..95fd1cced3 100644 --- a/src/pocketmine/inventory/CraftingManager.php +++ b/src/pocketmine/inventory/CraftingManager.php @@ -297,7 +297,7 @@ class CraftingManager{ * @param Recipe $recipe */ public function registerRecipe(Recipe $recipe){ - $recipe->setId(UUID::fromData(++self::$RECIPE_COUNT, $recipe->getResult()->getId(), $recipe->getResult()->getDamage(), $recipe->getResult()->getCount(), $recipe->getResult()->getCompoundTag())); + $recipe->setId(UUID::fromData((string) ++self::$RECIPE_COUNT, (string) $recipe->getResult()->getId(), (string) $recipe->getResult()->getDamage(), (string) $recipe->getResult()->getCount(), $recipe->getResult()->getCompoundTag())); if($recipe instanceof ShapedRecipe){ $this->registerShapedRecipe($recipe); diff --git a/src/pocketmine/scheduler/SendUsageTask.php b/src/pocketmine/scheduler/SendUsageTask.php index c8df78e998..a8eb9e25ee 100644 --- a/src/pocketmine/scheduler/SendUsageTask.php +++ b/src/pocketmine/scheduler/SendUsageTask.php @@ -44,7 +44,7 @@ class SendUsageTask extends AsyncTask{ $data = []; $data["uniqueServerId"] = $server->getServerUniqueId()->toString(); $data["uniqueMachineId"] = Utils::getMachineUniqueId()->toString(); - $data["uniqueRequestId"] = UUID::fromData($server->getServerUniqueId(), microtime(true))->toString(); + $data["uniqueRequestId"] = UUID::fromData($server->getServerUniqueId()->toString(), microtime(false))->toString(); switch($type){ case self::TYPE_OPEN: