mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-22 18:55:18 +00:00
Initial commit
This commit is contained in:
17
Commands/SaveOnCommand.cpp
Normal file
17
Commands/SaveOnCommand.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "stdafx.h"
|
||||
#include "SaveOnCommand.h"
|
||||
#include "ServerCommand.h"
|
||||
#include "../../Minecraft.Client/MinecraftServer.h"
|
||||
#include "../../Minecraft.Client/ConsoleInputSource.h"
|
||||
#include "../../Minecraft.Client/ServerLevel.h"
|
||||
|
||||
void SaveOnCommand::execute(const wstring& args, ConsoleInputSource *src, MinecraftServer *server)
|
||||
{
|
||||
for (unsigned int i = 0; i < server->levels.length; i++)
|
||||
{
|
||||
ServerLevel *level = server->levels[i];
|
||||
if (level)
|
||||
level->noSave = false;
|
||||
}
|
||||
ServerCommand::notifyAdmins(src, server, L"Turned on world auto-saving");
|
||||
}
|
||||
Reference in New Issue
Block a user