mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Shows the correct message ingame but not in the console. PocketMine doesn't handle the translation for gamemode changes, MCPE does. No idea why but it requires the second and third parameter.... commands.gamemode.success.other=Set %2$s's game mode to %3$s commands.gamemode.success.self=Set own game mode to %3$s To solve the problem we have to change the language files and let PocketMine-MP translate it.
This commit is contained in:
parent
2d5567d9dd
commit
1908ed5812
@ -77,10 +77,10 @@ class GamemodeCommand extends VanillaCommand{
|
||||
$sender->sendMessage("Game mode change for " . $target->getName() . " failed!");
|
||||
}else{
|
||||
if($target === $sender){
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.self", [Server::getGamemodeString($gameMode)]));
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.self", ['blame', 'mojang', Server::getGamemodeString($gameMode)]));
|
||||
}else{
|
||||
$target->sendMessage(new TranslationContainer("gameMode.changed"));
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.other", [$target->getName(), Server::getGamemodeString($gameMode)]));
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.other", ['blame mojang', $target->getName(), Server::getGamemodeString($gameMode)]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user