mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 06:25:32 +00:00
PlayerDuplicateLoginEvent: remove dead code
This commit is contained in:
parent
06ad1a2d2b
commit
002f7d6826
@ -38,16 +38,12 @@ class PlayerDuplicateLoginEvent extends Event implements Cancellable{
|
|||||||
use CancellableTrait;
|
use CancellableTrait;
|
||||||
use PlayerDisconnectEventTrait;
|
use PlayerDisconnectEventTrait;
|
||||||
|
|
||||||
private Translatable|string $disconnectMessage;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private NetworkSession $connectingSession,
|
private NetworkSession $connectingSession,
|
||||||
private NetworkSession $existingSession,
|
private NetworkSession $existingSession,
|
||||||
private Translatable|string $disconnectReason,
|
private Translatable|string $disconnectReason,
|
||||||
private Translatable|string|null $disconnectScreenMessage
|
private Translatable|string|null $disconnectScreenMessage
|
||||||
){
|
){}
|
||||||
$this->disconnectMessage = KnownTranslationFactory::disconnectionScreen_loggedinOtherLocation();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getConnectingSession() : NetworkSession{
|
public function getConnectingSession() : NetworkSession{
|
||||||
return $this->connectingSession;
|
return $this->connectingSession;
|
||||||
@ -56,15 +52,4 @@ class PlayerDuplicateLoginEvent extends Event implements Cancellable{
|
|||||||
public function getExistingSession() : NetworkSession{
|
public function getExistingSession() : NetworkSession{
|
||||||
return $this->existingSession;
|
return $this->existingSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the message shown to the session which gets disconnected.
|
|
||||||
*/
|
|
||||||
public function getDisconnectMessage() : Translatable|string{
|
|
||||||
return $this->disconnectMessage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setDisconnectMessage(Translatable|string $message) : void{
|
|
||||||
$this->disconnectMessage = $message;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user