Network: Deprecate some garbage

Deprecations on a patch version breaks release protocol, but I don't care at this point. Nobody should have been using this shit anyway.
This commit is contained in:
Dylan K. Taylor 2018-12-31 22:52:33 +00:00
parent 75a0627bf2
commit f7de6eb59f
4 changed files with 11 additions and 3 deletions

View File

@ -26,7 +26,8 @@ namespace pocketmine\event\server;
use pocketmine\network\SourceInterface; use pocketmine\network\SourceInterface;
/** /**
* Called when a network interface crashes, with relevant crash information. * Never called. Should never have come into this world. Nothing to see here.
* @deprecated
*/ */
class NetworkInterfaceCrashEvent extends NetworkInterfaceEvent{ class NetworkInterfaceCrashEvent extends NetworkInterfaceEvent{
/** /**

View File

@ -84,10 +84,14 @@ class Network{
public function processInterfaces(){ public function processInterfaces(){
foreach($this->interfaces as $interface){ foreach($this->interfaces as $interface){
$this->processInterface($interface); $interface->process();
} }
} }
/**
* @deprecated
* @param SourceInterface $interface
*/
public function processInterface(SourceInterface $interface) : void{ public function processInterface(SourceInterface $interface) : void{
$interface->process(); $interface->process();
} }

View File

@ -71,6 +71,9 @@ interface SourceInterface{
public function shutdown(); public function shutdown();
/**
* @deprecated
*/
public function emergencyShutdown(); public function emergencyShutdown();
} }

View File

@ -89,7 +89,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
public function start(){ public function start(){
$this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{ $this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{
$this->server->getNetwork()->processInterface($this); $this->process();
}); });
$this->rakLib->start(PTHREADS_INHERIT_CONSTANTS); //HACK: MainLogger needs constants for exception logging $this->rakLib->start(PTHREADS_INHERIT_CONSTANTS); //HACK: MainLogger needs constants for exception logging
} }