mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Moved Player->setGamemode() message to /gamemode command
This commit is contained in:
parent
88797d4c6c
commit
d6186fa7c6
@ -969,10 +969,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
|
||||
if(($this->gamemode & 0x01) === ($gm & 0x01)){
|
||||
$this->gamemode = $gm;
|
||||
$this->sendMessage(new TranslationContainer("gameMode.changed"));
|
||||
}else{
|
||||
$this->gamemode = $gm;
|
||||
$this->sendMessage(new TranslationContainer("gameMode.changed"));
|
||||
$this->inventory->clearAll();
|
||||
$this->inventory->sendContents($this);
|
||||
$this->inventory->sendContents($this->getViewers());
|
||||
|
@ -79,6 +79,7 @@ class GamemodeCommand extends VanillaCommand{
|
||||
if($target === $sender){
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.self", [Server::getGamemodeString($gameMode)]));
|
||||
}else{
|
||||
$target->sendMessage(new TranslationContainer("gameMode.changed"));
|
||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.gamemode.success.other", [$target->getName(), Server::getGamemodeString($gameMode)]));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user