From d6186fa7c6cfc7a086f5f2392d32b9cc575607a2 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 15 Apr 2015 20:49:38 +0200 Subject: [PATCH] Moved Player->setGamemode() message to /gamemode command --- src/pocketmine/Player.php | 2 -- src/pocketmine/command/defaults/GamemodeCommand.php | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 7303cbce0..b32e424ca 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -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()); diff --git a/src/pocketmine/command/defaults/GamemodeCommand.php b/src/pocketmine/command/defaults/GamemodeCommand.php index 0563c0f19..30b562a68 100644 --- a/src/pocketmine/command/defaults/GamemodeCommand.php +++ b/src/pocketmine/command/defaults/GamemodeCommand.php @@ -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)])); } }