Updated RakLib dependency

This commit is contained in:
Dylan K. Taylor 2018-02-19 10:01:56 +00:00
parent 99ef3e6576
commit cbbed6a6c1
3 changed files with 14 additions and 14 deletions

View File

@ -21,7 +21,7 @@
"ext-yaml": ">=2.0.0", "ext-yaml": ">=2.0.0",
"ext-zip": "*", "ext-zip": "*",
"ext-zlib": ">=1.2.11", "ext-zlib": ">=1.2.11",
"pocketmine/raklib": "dev-master#9b50878021ca545684fc1fd2d9333911ab2988e1", "pocketmine/raklib": "dev-master#87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
"pocketmine/pocketmine-spl": "^0.2.0", "pocketmine/pocketmine-spl": "^0.2.0",
"pocketmine/pocketmine-binaryutils": "dev-master#a7cd5303a3b215d26bf9be76682ce9311f40e887", "pocketmine/pocketmine-binaryutils": "dev-master#a7cd5303a3b215d26bf9be76682ce9311f40e887",
"pocketmine/pocketmine-nbt": "dev-master#33aaaebab10b501d233b6208d6a170b82f40c3b4" "pocketmine/pocketmine-nbt": "dev-master#33aaaebab10b501d233b6208d6a170b82f40c3b4"

10
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "b649f9dd4cf9477cfe9027cdb75858e0", "content-hash": "5cf5b17b7ad474212f61300e4fbbd012",
"packages": [ "packages": [
{ {
"name": "pocketmine/pocketmine-binaryutils", "name": "pocketmine/pocketmine-binaryutils",
@ -116,12 +116,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/RakLib.git", "url": "https://github.com/pmmp/RakLib.git",
"reference": "9b50878021ca545684fc1fd2d9333911ab2988e1" "reference": "87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/9b50878021ca545684fc1fd2d9333911ab2988e1", "url": "https://api.github.com/repos/pmmp/RakLib/zipball/87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
"reference": "9b50878021ca545684fc1fd2d9333911ab2988e1", "reference": "87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -146,7 +146,7 @@
"source": "https://github.com/pmmp/RakLib/tree/master", "source": "https://github.com/pmmp/RakLib/tree/master",
"issues": "https://github.com/pmmp/RakLib/issues" "issues": "https://github.com/pmmp/RakLib/issues"
}, },
"time": "2018-02-07T08:10:25+00:00" "time": "2018-02-18T20:15:02+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@ -98,7 +98,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
return $work; return $work;
} }
public function closeSession($identifier, $reason){ public function closeSession(string $identifier, string $reason) : void{
if(isset($this->players[$identifier])){ if(isset($this->players[$identifier])){
$player = $this->players[$identifier]; $player = $this->players[$identifier];
unset($this->identifiers[spl_object_hash($player)]); unset($this->identifiers[spl_object_hash($player)]);
@ -125,7 +125,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->interface->emergencyShutdown(); $this->interface->emergencyShutdown();
} }
public function openSession($identifier, $address, $port, $clientID){ public function openSession(string $identifier, string $address, int $port, int $clientID) : void{
$ev = new PlayerCreationEvent($this, Player::class, Player::class, $address, $port); $ev = new PlayerCreationEvent($this, Player::class, Player::class, $address, $port);
$this->server->getPluginManager()->callEvent($ev); $this->server->getPluginManager()->callEvent($ev);
$class = $ev->getPlayerClass(); $class = $ev->getPlayerClass();
@ -137,7 +137,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->server->addPlayer($identifier, $player); $this->server->addPlayer($identifier, $player);
} }
public function handleEncapsulated($identifier, EncapsulatedPacket $packet, $flags){ public function handleEncapsulated(string $identifier, EncapsulatedPacket $packet, int $flags) : void{
if(isset($this->players[$identifier])){ if(isset($this->players[$identifier])){
//get this now for blocking in case the player was closed before the exception was raised //get this now for blocking in case the player was closed before the exception was raised
$address = $this->players[$identifier]->getAddress(); $address = $this->players[$identifier]->getAddress();
@ -164,7 +164,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->interface->unblockAddress($address); $this->interface->unblockAddress($address);
} }
public function handleRaw($address, $port, $payload){ public function handleRaw(string $address, int $port, string $payload) : void{
$this->server->handlePacket($address, $port, $payload); $this->server->handlePacket($address, $port, $payload);
} }
@ -172,7 +172,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->interface->sendRaw($address, $port, $payload); $this->interface->sendRaw($address, $port, $payload);
} }
public function notifyACK($identifier, $identifierACK){ public function notifyACK(string $identifier, int $identifierACK) : void{
} }
@ -198,8 +198,8 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->interface->sendOption("portChecking", (bool) $name); $this->interface->sendOption("portChecking", (bool) $name);
} }
public function handleOption($name, $value){ public function handleOption(string $option, string $value) : void{
if($name === "bandwidth"){ if($option === "bandwidth"){
$v = unserialize($value); $v = unserialize($value);
$this->network->addStatistics($v["up"], $v["down"]); $this->network->addStatistics($v["up"], $v["down"]);
} }
@ -241,7 +241,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
return null; return null;
} }
public function updatePing(string $identifier, int $pingMS){ public function updatePing(string $identifier, int $pingMS) : void{
if(isset($this->players[$identifier])){ if(isset($this->players[$identifier])){
$this->players[$identifier]->updatePing($pingMS); $this->players[$identifier]->updatePing($pingMS);
} }