    001package net.minecraft.command;
    002
    003import net.minecraft.server.MinecraftServer;
    004import net.minecraft.world.WorldServer;
    005
    006public class CommandServerSaveOff extends CommandBase
    007{
    008    public String getCommandName()
    009    {
    010        return "save-off";
    011    }
    012
    013    /**
    014     * Return the required permission level for this command.
    015     */
    016    public int getRequiredPermissionLevel()
    017    {
    018        return 4;
    019    }
    020
    021    public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    022    {
    023        MinecraftServer var3 = MinecraftServer.getServer();
    024
    025        for (int var4 = 0; var4 < var3.worldServers.length; ++var4)
    026        {
    027            if (var3.worldServers[var4] != null)
    028            {
    029                WorldServer var5 = var3.worldServers[var4];
    030                var5.canNotSave = true;
    031            }
    032        }
    033
    034        notifyAdmins(par1ICommandSender, "commands.save.disabled", new Object[0]);
    035    }
    036}