Merge branch 'master' into mcpe-1.2

This commit is contained in:
Dylan K. Taylor
2017-08-16 12:31:12 +01:00
12 changed files with 115 additions and 46 deletions

View File

@ -34,6 +34,11 @@ interface AdvancedSourceInterface extends SourceInterface{
*/
public function blockAddress(string $address, int $timeout = 300);
/**
* @param string $address
*/
public function unblockAddress(string $address);
/**
* @param Network $network
*/

View File

@ -171,4 +171,10 @@ class Network{
$interface->blockAddress($address, $timeout);
}
}
public function unblockAddress(string $address){
foreach($this->advancedInterfaces as $interface){
$interface->unblockAddress($address);
}
}
}

View File

@ -152,6 +152,10 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->interface->blockAddress($address, $timeout);
}
public function unblockAddress(string $address){
$this->interface->unblockAddress($address);
}
public function handleRaw($address, $port, $payload){
$this->server->handlePacket($address, $port, $payload);
}