mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
parent
a81680c5c6
commit
5da90b9530
@ -62,8 +62,6 @@ class ConsoleCommandSender implements CommandSender{
|
||||
$server = $this->getServer();
|
||||
if($message instanceof Translatable){
|
||||
$message = $this->getLanguage()->translate($message);
|
||||
}else{
|
||||
$message = $this->getLanguage()->translateString($message);
|
||||
}
|
||||
|
||||
foreach(explode("\n", trim($message)) as $line){
|
||||
|
@ -137,7 +137,7 @@ class Language{
|
||||
$baseText = $this->parseTranslation(($onlyPrefix === null or strpos($str, $onlyPrefix) === 0) ? $baseText : $str, $onlyPrefix);
|
||||
|
||||
foreach($params as $i => $p){
|
||||
$replacement = $p instanceof Translatable ? $this->translate($p) : $this->internalGet((string) $p) ?? $this->parseTranslation((string) $p);
|
||||
$replacement = $p instanceof Translatable ? $this->translate($p) : (string) $p;
|
||||
$baseText = str_replace("{%$i}", $replacement, $baseText);
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ class Language{
|
||||
$baseText = $this->parseTranslation($baseText ?? $c->getText());
|
||||
|
||||
foreach($c->getParameters() as $i => $p){
|
||||
$replacement = $p instanceof Translatable ? $this->translate($p) : $this->internalGet($p) ?? $this->parseTranslation($p);
|
||||
$replacement = $p instanceof Translatable ? $this->translate($p) : $p;
|
||||
$baseText = str_replace("{%$i}", $replacement, $baseText);
|
||||
}
|
||||
|
||||
|
@ -582,7 +582,7 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
if($error !== null){
|
||||
$this->disconnect($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_disconnect_invalidSession($error)));
|
||||
$this->disconnect($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_disconnect_invalidSession($this->server->getLanguage()->translateString($error))));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1779,7 +1779,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->getNetworkSession()->onRawChatMessage($this->getLanguage()->translateString($message));
|
||||
$this->getNetworkSession()->onRawChatMessage($message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user