the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 36 lines 991 B view raw
1/* 2package net.minecraft.commands.common; 3 4import net.minecraft.commands.BaseCommand; 5import net.minecraft.commands.CommandSender; 6import net.minecraft.commands.exceptions.UsageException; 7import net.minecraft.server.MinecraftServer; 8 9public class SetPlayerTimeoutCommand extends BaseCommand { 10 public String getName() { 11 return "setidletimeout"; 12 } 13 14 @Override 15 public int getPermissionLevel() { 16 return LEVEL_ADMINS; 17 } 18 19 @Override 20 public String getUsage(CommandSender source) { 21 return "commands.setidletimeout.usage"; 22 } 23 24 public void execute(CommandSender source, String[] args) { 25 if (args.length == 1) { 26 int timeout = convertArgToInt(source, args[0], 0); 27 MinecraftServer.getInstance().setPlayerIdleTimeout(timeout); 28 logAdminAction(source, "commands.setidletimeout.success", timeout); 29 return; 30 } 31 32 throw new UsageException("commands.setidletimeout.usage"); 33 } 34} 35 36*/