package net.minecraft.command;

import net.minecraft.server.MinecraftServer;

public class CommandSetPlayerTimeout extends CommandBase
{
	private static final String __OBFID = "CL_00000999";

	public String getCommandName()
	{
		return "setidletimeout";
	}

	public int getRequiredPermissionLevel()
	{
		return 3;
	}

	public String getCommandUsage(ICommandSender par1ICommandSender)
	{
		return "commands.setidletimeout.usage";
	}

	public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
	{
		if (par2ArrayOfStr.length == 1)
		{
			int i = parseIntWithMin(par1ICommandSender, par2ArrayOfStr[0], 0);
			MinecraftServer.getServer().func_143006_e(i);
			notifyAdmins(par1ICommandSender, "commands.setidletimeout.success", new Object[] {Integer.valueOf(i)});
		}
		else
		{
			throw new WrongUsageException("commands.setidletimeout.usage", new Object[0]);
		}
	}
}