mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Move block and network namespaces away from PluginManager->callEvent()
the original step that wasn't supposed to cause conflicts, caused messy conflicts... so I might as well do this part too
This commit is contained in:
@ -88,7 +88,8 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
||||
$this->server->getLogger()->debug("Still " . strlen($remains) . " bytes unread in " . $packet->getName() . ": 0x" . bin2hex($remains));
|
||||
}
|
||||
|
||||
$this->server->getPluginManager()->callEvent($ev = new DataPacketReceiveEvent($this->player, $packet));
|
||||
$ev = new DataPacketReceiveEvent($this->player, $packet);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled() and !$packet->handle($this)){
|
||||
$this->server->getLogger()->debug("Unhandled " . $packet->getName() . " received from " . $this->player->getName() . ": 0x" . bin2hex($packet->buffer));
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
|
||||
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);
|
||||
$ev->call();
|
||||
$class = $ev->getPlayerClass();
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user