mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-04 02:52:25 +00:00
Updated RakLib dependency
This commit is contained in:
parent
99ef3e6576
commit
cbbed6a6c1
@ -21,7 +21,7 @@
|
||||
"ext-yaml": ">=2.0.0",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": ">=1.2.11",
|
||||
"pocketmine/raklib": "dev-master#9b50878021ca545684fc1fd2d9333911ab2988e1",
|
||||
"pocketmine/raklib": "dev-master#87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
|
||||
"pocketmine/pocketmine-spl": "^0.2.0",
|
||||
"pocketmine/pocketmine-binaryutils": "dev-master#a7cd5303a3b215d26bf9be76682ce9311f40e887",
|
||||
"pocketmine/pocketmine-nbt": "dev-master#33aaaebab10b501d233b6208d6a170b82f40c3b4"
|
||||
|
10
composer.lock
generated
10
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "b649f9dd4cf9477cfe9027cdb75858e0",
|
||||
"content-hash": "5cf5b17b7ad474212f61300e4fbbd012",
|
||||
"packages": [
|
||||
{
|
||||
"name": "pocketmine/pocketmine-binaryutils",
|
||||
@ -116,12 +116,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/RakLib.git",
|
||||
"reference": "9b50878021ca545684fc1fd2d9333911ab2988e1"
|
||||
"reference": "87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/9b50878021ca545684fc1fd2d9333911ab2988e1",
|
||||
"reference": "9b50878021ca545684fc1fd2d9333911ab2988e1",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
|
||||
"reference": "87d7e7fba9d8b2231d95d8f55e19c060ebbcb35c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -146,7 +146,7 @@
|
||||
"source": "https://github.com/pmmp/RakLib/tree/master",
|
||||
"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": [],
|
||||
|
@ -98,7 +98,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
return $work;
|
||||
}
|
||||
|
||||
public function closeSession($identifier, $reason){
|
||||
public function closeSession(string $identifier, string $reason) : void{
|
||||
if(isset($this->players[$identifier])){
|
||||
$player = $this->players[$identifier];
|
||||
unset($this->identifiers[spl_object_hash($player)]);
|
||||
@ -125,7 +125,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
$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);
|
||||
$this->server->getPluginManager()->callEvent($ev);
|
||||
$class = $ev->getPlayerClass();
|
||||
@ -137,7 +137,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
$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])){
|
||||
//get this now for blocking in case the player was closed before the exception was raised
|
||||
$address = $this->players[$identifier]->getAddress();
|
||||
@ -164,7 +164,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
$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);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
$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);
|
||||
}
|
||||
|
||||
public function handleOption($name, $value){
|
||||
if($name === "bandwidth"){
|
||||
public function handleOption(string $option, string $value) : void{
|
||||
if($option === "bandwidth"){
|
||||
$v = unserialize($value);
|
||||
$this->network->addStatistics($v["up"], $v["down"]);
|
||||
}
|
||||
@ -241,7 +241,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function updatePing(string $identifier, int $pingMS){
|
||||
public function updatePing(string $identifier, int $pingMS) : void{
|
||||
if(isset($this->players[$identifier])){
|
||||
$this->players[$identifier]->updatePing($pingMS);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user