mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added KnownTranslationFactory and use it in as many places as possible
this makes translation usage much more statically analysable. The only places this isn't used are: - places that prefix translations with colours (those are still a problem) - places where server/client translations don't match (e.g. gameMode.changed accepts different parameters in vanilla than in PM)
This commit is contained in:
@ -80,6 +80,7 @@ use pocketmine\item\enchantment\MeleeWeaponEnchantment;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemUseResult;
|
||||
use pocketmine\item\Releasable;
|
||||
use pocketmine\lang\KnownTranslationFactory;
|
||||
use pocketmine\lang\KnownTranslationKeys;
|
||||
use pocketmine\lang\Language;
|
||||
use pocketmine\lang\TranslationContainer;
|
||||
@ -276,16 +277,16 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->server->getLogger()->info($this->getServer()->getLanguage()->translateString(KnownTranslationKeys::POCKETMINE_PLAYER_LOGIN, [
|
||||
$this->server->getLogger()->info($this->getServer()->getLanguage()->translate(KnownTranslationFactory::pocketmine_player_logIn(
|
||||
TextFormat::AQUA . $this->username . TextFormat::WHITE,
|
||||
$session->getIp(),
|
||||
$session->getPort(),
|
||||
$this->id,
|
||||
(string) $session->getPort(),
|
||||
(string) $this->id,
|
||||
$this->getWorld()->getDisplayName(),
|
||||
round($this->location->x, 4),
|
||||
round($this->location->y, 4),
|
||||
round($this->location->z, 4)
|
||||
]));
|
||||
(string) round($this->location->x, 4),
|
||||
(string) round($this->location->y, 4),
|
||||
(string) round($this->location->z, 4)
|
||||
)));
|
||||
|
||||
$this->server->addOnlinePlayer($this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user