Merge branch 'next-minor' into next-major

This commit is contained in:
Dylan K. Taylor
2022-12-23 16:58:59 +00:00
11 changed files with 161 additions and 86 deletions

View File

@ -68,6 +68,11 @@ class GamemodeCommand extends VanillaCommand{
throw new InvalidCommandSyntaxException();
}
if($target->getGamemode()->equals($gameMode)){
$sender->sendMessage(KnownTranslationFactory::pocketmine_command_gamemode_failure($target->getName()));
return true;
}
$target->setGamemode($gameMode);
if(!$gameMode->equals($target->getGamemode())){
$sender->sendMessage(KnownTranslationFactory::pocketmine_command_gamemode_failure($target->getName()));