I think there's a MinecraftClient.Disconnect method. Use that. Also, check to see if the specified client is online first, instead of throwing an exception. If you throw an exception, the user of the command is disconnected.