mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Merge branch 'master' into mcpe-1.2
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
@ -171,4 +171,10 @@ class Network{
|
||||
$interface->blockAddress($address, $timeout);
|
||||
}
|
||||
}
|
||||
|
||||
public function unblockAddress(string $address){
|
||||
foreach($this->advancedInterfaces as $interface){
|
||||
$interface->unblockAddress($address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user