2
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB
Java

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";
}
/**
* Return the required permission level for this command.
*/
public int getRequiredPermissionLevel()
{
return 3;
}
public String getCommandUsage(ICommandSender sender)
{
return "commands.setidletimeout.usage";
}
public void processCommand(ICommandSender sender, String[] args)
{
if (args.length == 1)
{
int i = parseIntWithMin(sender, args[0], 0);
MinecraftServer.getServer().func_143006_e(i);
func_152373_a(sender, this, "commands.setidletimeout.success", new Object[] {Integer.valueOf(i)});
}
else
{
throw new WrongUsageException("commands.setidletimeout.usage", new Object[0]);
}
}
}