Skip to content

Commit

Permalink
Cleanup and new commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Exxarion committed Jul 5, 2015
1 parent c5bf1f6 commit 6116753
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/WorldGM/WorldGM.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
$sender->sendMessage($this->includePlayerCmd($sender, $args));
return true;
case "version":
$sender->sendMessage(TextFormat::DARK_GREEN."Your copy of WorldGM is running on v7.0\n".TextFormat::YELLOW.">> Check for updates by running this command:\n".TextFormat::GOLD."/wgm update");
$sender->sendMessage(TextFormat::DARK_GREEN."Your copy of WorldGM is running on v8.0\n".TextFormat::YELLOW.">> Check for updates by running this command:\n".TextFormat::GOLD."/wgm update");
return true;
case "check":
$sender->sendMessage($this->checkGmCmd($sender));
Expand All @@ -69,8 +69,12 @@ public function onCommand(CommandSender $sender, Command $command, $label, array
$sender->sendMessage($this->updatePlugin($sender));
return true;
default:
$sender->sendMessage(TextFormat::YELLOW."-------------------\n".TextFormat::GREEN."WorldGM - Version 7.0\n".TextFormat::BLUE."Set Different gamemodes for different worlds\n".TextFormat::DARK_GREEN."Usages:\n".TextFormat::AQUA."/wgm set <0/1/2> <world>\n".TextFormat::AQUA."/wgm <include/exclude> <player>\n".TextFormat::AQUA."/wgm version\n".TextFormat::AQUA."/wgm check\n".TextFormat::AQUA."/wgm gm\n".TextFormat::AQUA."/wgm update\n".TextFormat::DARK_RED."- Created by Exxarion\n".TextFormat::YELLOW."-------------------");
$sender->sendMessage(TextFormat::YELLOW."-------------------\n".TextFormat::GREEN."WorldGM - Version 8.0\n".TextFormat::BLUE."Set Different gamemodes for different worlds\n".TextFormat::DARK_GREEN."Usages:\n".TextFormat::AQUA."/wgm set <0/1/2> <world>\n".TextFormat::AQUA."/wgm <include/exclude> <player>\n".TextFormat::AQUA."/wgm version\n".TextFormat::AQUA."/wgm check\n".TextFormat::AQUA."/wgm gm\n".TextFormat::AQUA."/wgm update\n".TextFormat::DARK_RED."- Created by Exxarion\n".TextFormat::YELLOW."-------------------");
return true;
case "s":
$sender->setGamemode(Survival);
case "c":
$sender->setGamemode(Creative);

}
default:
Expand Down Expand Up @@ -119,7 +123,6 @@ public function checkPlayer($player) {
if (!$isExcluded && $gmNeedsChanging) {

$player->setGamemode($gamemodeTo);
$player->sendMessage(TextFormat::GREEN."[WorldGM] Your gamemode has been changed to $gamemodeTo");
} else {
return false;
}
Expand Down Expand Up @@ -163,7 +166,7 @@ public function setWorldCmd($sender, $params) {

Utilities::setWorldGamemode($this->getConfig(), $world, $mode);
$this->checkAllPlayers($world);
return TextFormat::GREEN."[WorldGM] The gamemode of $world has been set to $mode.\n".TextFormat::YELLOW."[WorldGM] Please run".TextFormat::RED." /stop".TextFormat::YELLOW." in order for changes to go into effect.";
return TextFormat::GREEN."[WorldGM] The gamemode of $world has been set to $mode.\n";
}

public function excludePlayerCmd($sender, $params) {
Expand Down

0 comments on commit 6116753

Please sign in to comment.