
net.minecraft.server.CommandIdleTimeout Maven / Gradle / Ivy
package net.minecraft.server;
public class CommandIdleTimeout extends CommandAbstract {
public CommandIdleTimeout() {
}
public String getCommand() {
return "setidletimeout";
}
public int a() {
return 3;
}
public String getUsage(ICommandListener icommandlistener) {
return "commands.setidletimeout.usage";
}
public void execute(ICommandListener icommandlistener, String[] astring) throws CommandException {
if (astring.length != 1) {
throw new ExceptionUsage("commands.setidletimeout.usage");
} else {
int i = a(astring[0], 0);
MinecraftServer.getServer().setIdleTimeout(i);
a(icommandlistener, this, "commands.setidletimeout.success", Integer.valueOf(i));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy